Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

FHIRPath implementation in Python.

License

NotificationsYou must be signed in to change notification settings

dkapitan/fhirpath-py

 
 

Repository files navigation

Build StatuscodecovpypiSupported Python version

FHIRPath implementation in Python

Parser was generated withantlr4

Getting started

Install

pip install fhirpathpy

Usage

fromfhirpathpyimportevaluatepatient= {"resourceType":"Patient","id":"example","name": [    {"use":"official","given": ["Peter","James"      ],"family":"Chalmers"    },    {"use":"usual","given": ["Jim"      ]    },    {"use":"maiden","given": ["Peter","James"      ],"family":"Windsor","period": {"end":"2002"      }    }  ]}# Evaluating FHIRPathresult=evaluate(patient,"Patient.name.where(use='usual').given.first()", [])# result: `['Jim']`

evaluate

Evaluates the "path" FHIRPath expression on the given resource, using data from "context" for variables mentioned in the "path" expression.

Parameters

resource (dict|list): FHIR resource, bundle as js object or array of resources This resource will be modified by this function to add type information.

path (string): fhirpath expression, sample 'Patient.name.given'

context (dict): a hash of variable name/value pairs.

model (dict): The "model" data object specific to a domain, e.g. R4.

compile

Returns a function that takes a resource and an optional context hash (see "evaluate"), and returns the result of evaluating the given FHIRPath expression on that resource. The advantage of this function over "evaluate" is that if you have multiple resources, the given FHIRPath expression will only be parsed once

Parameters

path (string) - the FHIRPath expression to be parsed.

model (dict) - The "model" data object specific to a domain, e.g. R4.

About

FHIRPath implementation in Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python97.6%
  • ANTLR2.4%

[8]ページ先頭

©2009-2025 Movatter.jp