Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
Ref #21
  • Loading branch information
ir4y committed Jul 1, 2023
1 parent 3805a4a commit 27a5569
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions tests/test_real.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,37 @@ def pickle_test():
assert reload(resource) == ["Patient/cdf"]




def extension_test():
patient = {
"identifier": [
{
"period": {
"start": "2020-01-01"
},
"system": "http://hl7.org/fhir/sid/us-mbi",
"type": {
"coding": [
{
"code": "MC",
"display": "Patient's Medicare number",
"extension": [
{
"url": "https://bluebutton.cms.gov/resources/codesystem/identifier-currency",
"valueCoding": {
"code": "current",
"display": "Current",
"system": "https://bluebutton.cms.gov/resources/codesystem/identifier-currency"
}
}
],
"system": "http://terminology.hl7.org/CodeSystem/v2-0203"
}
]
},
"value": "7SM0A00AA00"
}
],
"resourceType": "Patient"
}
result = evaluate(patient, "Patient.identifier.where(type.coding.extension('https://bluebutton.cms.gov/resources/codesystem/identifier-currency').valueCoding.code = 'current').where(system = 'http://hl7.org/fhir/sid/us-mbi').value")
assert result == ["7SM0A00AA00"]

0 comments on commit 27a5569

Please sign in to comment.