Questions in Observation submit
Opened this issue · 1 comments
leofu151 commented
I created a mb-fhir-form
to submit blood pressure FHIR observation. Although it works I am not sure how to specify the subject and value unit as described below.
Subject
FHIR example
"subject": {
"reference": "Patient/{{ _.patientFHIRId }}",
"display": ""
}
Here is the code to specify the subject reference using mb-context
but doesn't seem to have any effect:
<mb-context path="subject.reference" bind="Patient/1" />
<mb-context path="subject.reference" bind="Patient/{fhir_id}" />
Quantity
FHIR example
"valueQuantity": {
"value": 115.3,
"unit": "mmHg",
"system": "http: //unitsofmeasure.org",
"code": "mm[Hg]"
}
Here is how I setup quantity
<mb-input label="Systolic" path="valueQuantity.value" />
and that maps to this
"valueQuantity": {
"value": 115.3,
}
How can I set the unit, system and code?
leofu151 commented
I figured out you can set the unit using mb-context
like this
<mb-context path="valueQuantity.unit" bind="mmHg" />
<mb-context path="valueQuantity.system" bind="http://unitsofmeasure.org" />
<mb-context path="valueQuantity.code" bind="mm[Hg]" />
But it seems only work because valueQuantity
was referenced in mb-input
. The same mechanism wouldn't work for subject.