Closed synsteve closed 4 years ago
You could either add underscore properties to the parsedStructureDefinitions in the parser or change the validator to check for them if the 'standard' property is a primitive type. I favour the latter.
This has been resolved as part of commit 83c25996afa7d01539a7b741f95976d04c72e7c6. I have tagged it as v4.7.4 and released version 4.7.4 on npm.
E.g, in the example Patient.json on the FHIR website: ... "birthDate": "1974-12-25", "_birthDate": { "id": "314159", "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime", "valueDateTime": "1974-12-25T14:35:45-05:00" } ] } ...
Because brithDate is a primitive, in order to add "id" and/or "extension", you must use the _birthDate property. FHIR.js currently sees this as unexpected but should treat it as an object of type "Element"