cds-hooks / sandbox

CDS Hooks Sandbox
http://sandbox.cds-hooks.org
Apache License 2.0
34 stars 32 forks source link

CDS Hooks FHIR R4 (v4.0.0) Sandbox dosageInstruction schema issue #109

Closed ssmillard closed 5 years ago

ssmillard commented 5 years ago

Testing with the R4 version of Hooks sandbox, performing a order-select hook. The draftOrders/ dosageInstruction/doseQuantity appear to be built incorrectly (looks like release 3) :

Create from sandbox:

"draftOrders": { "resourceType": "Bundle", "entry": [{ "resource": { "resourceType": "MedicationRequest", "id": "request-123", "authoredOn": "2019-08-14", "status": "draft", "subject": { "reference": "Patient/SMART-1288992" }, "dosageInstruction": [{ "doseQuantity": { "value": 1, "system": "http://unitsofmeasure.org", "code": "{pill}" }, "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d", "boundsPeriod": { "start": "2019-08-14", "end": "2019-08-29" } } } }],

R4 introduced doseAndRate:

"draftOrders": { "resourceType": "Bundle", "entry": [{ "resource": { "resourceType": "MedicationRequest", "id": "request-123", "authoredOn": "2019-08-14", "status": "draft", "subject": { "reference": "Patient/SMART-1288992" }, "dosageInstruction": [{ "doseAndRate": { "doseQuantity": { "value": 1, "system": "http://unitsofmeasure.org", "code": "{pill}" } }, "timing": { "repeat": { "frequency": 1, "period": 1, "periodUnit": "d", "boundsPeriod": { "start": "2019-08-14", "end": "2019-08-29" } } } }],