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

add translation function: vsac --> internal valueset #41

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

fzhao99
Copy link
Collaborator

@fzhao99 fzhao99 commented Oct 21, 2024

PULL REQUEST

Summary

Adds a translation function / stubs out a test for translating a VSAC ValueSet response into our internal ValueSet type.

Related Issue

Fixes #phdi 2792

Acceptance Criteria

Since we will use ValueSet internally to model valuesets within the application and we will receive valuesets in a FHIR format from VSAC and possibly other terminology services in the future we need a way to transfrom from FHIR to our ValueSet model.

Additional Information

Left a slew of questions in the translation function that'd love feedback on!

// includeValueSet: boolean;
// concepts: Concept[];
// }
export interface InternalValueSet {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can change this once I sync up with Brandon on 2789

ersdConceptType: ErsdConceptType,
) {
const id = fhirValueset.id;
// does this need any interpolation?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would love answers on this and other questions here! Will remove these once we get them answered

Copy link
Collaborator

Choose a reason for hiding this comment

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

hm, could be worth adding, but I don't think we need to have v2/v3. I think we are using v3, which is backwards compatible with v2. Ideally, any future versions would maintain that, but out of full caution, could be worth not making that assumption.

@fzhao99 fzhao99 marked this pull request as ready for review October 21, 2024 20:49

// would we prefer this over the less readable "name?"
// ie "name": "ChlamydiaTrachomatisInfectionOrganismOrSubstanceInLabResults",
// "title": "Chlamydia trachomatis Infection (Organism or Substance in Lab Results)",
Copy link
Collaborator

Choose a reason for hiding this comment

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

you are correct, I think we always care about title over name for legibility.

ersdConceptType: ErsdConceptType,
) {
const id = fhirValueset.id;
// does this need any interpolation?
Copy link
Collaborator

Choose a reason for hiding this comment

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

hm, could be worth adding, but I don't think we need to have v2/v3. I think we are using v3, which is backwards compatible with v2. Ideally, any future versions would maintain that, but out of full caution, could be worth not making that assumption.

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