You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, evaluating "path.to.choiceType as Quantity" only works when a model is available. Example:
// example.jsimportfhirpathfrom"https://esm.sh/fhirpath"importr4from"https://esm.sh/fhirpath/fhir-context/r4"consto={"resourceType": "Observation","valueQuantity": {"value": 123}}constwithModel=fhirpath.evaluate(o,"value as Quantity",null,r4)constnoModel=fhirpath.evaluate(o,"value as Quantity")console.log("With model",withModel);console.log("No model",noModel);
$ deno run example.js
With model [ { value: 123 } ]
No model []
It'd be very convenient if fhirpath.js could make a "best effort" at resolving "as Quantity" using FHIR conventions, even without any specific model loaded. So looking for foo.bar as Quantity could essentially act like foo.barQuantity even if no model is available.
The text was updated successfully, but these errors were encountered:
Currently, evaluating "path.to.choiceType as Quantity" only works when a model is available. Example:
It'd be very convenient if fhirpath.js could make a "best effort" at resolving "as Quantity" using FHIR conventions, even without any specific model loaded. So looking for
foo.bar as Quantity
could essentially act likefoo.barQuantity
even if no model is available.The text was updated successfully, but these errors were encountered: