Skip to content

Commit

Permalink
Merge pull request #41 from vadi2/patch-1
Browse files Browse the repository at this point in the history
Fix formatting in readme
  • Loading branch information
ir4y authored Sep 4, 2024
2 parents 2f9eb55 + 37ddd09 commit 951d03d
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,27 @@ result = evaluate(patient, "Patient.name.where(use='usual').given.first()", [])
```

## 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.
Returns:
int: Description of return value
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.

**Returns**

int: Description of return value

## 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.
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.

0 comments on commit 951d03d

Please sign in to comment.