Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch the type of Element.id from id to string for R4B #160

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cybernop
Copy link

According to the FHIR documentation Element.id should be of type string.

StructureDefinitions with type slicing will have entries in the differential and snapshot part in the format like Observation.category:VSCat. This is valid according to the specification. But before the element was of type id which caused validation errors when parsing StructureDefinitions like this.

According to the FHIR documentation Element.id should be of type string. Before it was of type id which caused errors when parsing structure definitions with type scling what results the have `:` in their id. Which is allowed and supported for string but not for id.
@nazrulworld
Copy link
Owner

nazrulworld commented Jul 28, 2024

@cybernop
Copy link
Author

@cybernop Thanks a lot for your PR. Please have a look here https://github.com/nazrulworld/fhir.resources?tab=readme-ov-file#resourceid-aka-fhirtypesid-constraint-extensibility

Here is an example of patch https://github.com/nazrulworld/fhir.resources/blob/main/fhir/resources/core/patch/patch_r4b_test.py

@nazrulworld Thanks for the reply. But I do not fully understand what you are trying to tell me. Do you want to tell me error is on the user side or should should I add a test case? I do not want to to change the length of Id nor do I want to create a patch for something. I just wanted to fix an error in the data type definition.

In my opinion the type of Element.id in R4B is incorrect. In the definition it is of type string and all other version (DSTU2, STU3 and R5) use the correct data type for Element.id. Only in R4B id was used incorrectly which prevents using the library in my project because of invalid parsing errors.

@cybernop
Copy link
Author

I just want to stress that this is an issue of incorrect type and not the length of ID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants