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
I am trying to parse our created logical models in StructueDefinitions. For a few elements, we have defined polymorphic elements, like the JSON snippet below. I believe this is valid FHIR.
However, If I try to parse this resource, I get errors, like this:
2023-03-17 18:27:01.457242 error Parsing error, skipped: package/LogicalModel-HdBe-LaboratoryTestResult.json. Error message: 3 validation errors for StructureDefinition
differential -> element -> 3 -> id
string does not match regex "^[A-Za-z0-9\-.]+$" (type=value_error.str.regex; pattern=^[A-Za-z0-9\-.]+$)
differential -> element -> 7 -> id
string does not match regex "^[A-Za-z0-9\-.]+$" (type=value_error.str.regex; pattern=^[A-Za-z0-9\-.]+$)
differential -> element -> 8 -> id
string does not match regex "^[A-Za-z0-9\-.]+$" (type=value_error.str.regex; pattern=^[A-Za-z0-9\-.]+$)
from fhir.resources.fhirtypes import Id
Id.configure_constraints(regex=re.compile(r"^[A-Za-z0-9\-\.]+(\[x\](\.[a-zA-Z]+)?)?(:[A-Za-z0-9\-.]+(\[x\](\.[a-zA-Z]+)?)?)?$"))
Id.configure_constraints(max_length=128)
``
Description
I am trying to parse our created logical models in StructueDefinitions. For a few elements, we have defined polymorphic elements, like the JSON snippet below. I believe this is valid FHIR.
However, If I try to parse this resource, I get errors, like this:
This is the related definition of the FHIR element: https://www.hl7.org/fhir/element-definitions.html#Element.id which is of type string
The constraint is based on: https://www.hl7.org/fhir/datatypes.html#id for type id.
Should this constraint apply to
ElementDefinition.id
? Also, FHIR itself uses [x] in the Element.id : https://www.hl7.org/fhir/observation.profile.json.htmlWhat I Did
The text was updated successfully, but these errors were encountered: