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

Fix path returned for FHIR to HL7v2 default template errors #545

Closed
wants to merge 1 commit into from

Conversation

wi-y
Copy link
Contributor

@wi-y wi-y commented May 9, 2024

Previously when a default template did not exist the code was returning the default path of "Hl7v2/" when converting from FHIR to HL7v2. The path should be "Fhir/" so the PR updates the path that is returned.

@wi-y wi-y requested a review from a team May 9, 2024 19:54
: base(processorSettings, logger)
{
}

protected override DataType DataType { get; set; } = DataType.Fhir;
Copy link
Collaborator

@pallar-ms pallar-ms May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this would work as is. The value in DataType is used as the base folder within which we extract and search the default templates, and currently, DataType.Fhir is also used for FhirProcessor (STU3), so this will conflict.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when you add the default template for Fhir to Hl7v2, you will run into this. It might end up extracting both STU3 and the new templates you'll be adding into the same folder named 'Fhir', and cause issues on template lookups.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is a good point. This PR technically returns the correct error, but yeah I see how the DataType is used in in both the STU3 and the FhirToHl7v2 scenarios and would result in templates sharing the same path which is not ideal. I went ahead and separated the two into different paths using a new Enum called DefaultRootTemplateParentPath so that the input DataType is no longer used to determine the path. The changes for FHIR to HL7v2 default templates are being made as part of this larger PR: https://github.com/microsoft/FHIR-Converter/pull/557/files#diff-9e9af2fb4a114d2641a7b5b0caab08401bdcafbf10e5957321817235d8361d03 so I am going to abandon this PR since the changes are included in the other PR

@wi-y wi-y closed this May 16, 2024
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.

None yet

2 participants