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: add pager (and others) to contact info #2936

Merged
merged 12 commits into from
Nov 21, 2024
Merged

fix: add pager (and others) to contact info #2936

merged 12 commits into from
Nov 21, 2024

Conversation

mcmcgrath13
Copy link
Collaborator

@mcmcgrath13 mcmcgrath13 commented Nov 19, 2024

PULL REQUEST

Summary

Counterpart of skylight-hq/FHIR-Converter#13. This pulls in the newly available pager system and generalizes formatContactPoint to work with any of the fhir-supported systems and always return the values in a consistent sort order.

Related Issue

Fixes #2729
Fixes #2713

Additional Information

image

@mcmcgrath13 mcmcgrath13 changed the title fix: add pager to contact info fix: add pager (and others) to contact info Nov 20, 2024
@@ -1,7 +1,7 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build

# Download FHIR-Converter
RUN git clone https://github.com/skylight-hq/FHIR-Converter.git --branch v7.0-skylight-11 --single-branch /build/FHIR-Converter
RUN git clone https://github.com/skylight-hq/FHIR-Converter.git --branch mcm/fix-pager --single-branch /build/FHIR-Converter
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't think you meant to commit this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh you might've left this in temporarily for testing -- TY!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry about that - I usually leave a comment to myself to update it to a released version before merging

"other",
"",
];
const sortContacts = (contactPoints: ContactPoint[]): ContactPoint[] => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a JSDoc for this helper function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added!

[faxNumberUse, "Fax:", formatPhoneNumber(contactPoint.value ?? "")]
.join(" ")
.trim(),
[phoneNumberUse, formatPhoneNumber(value)].filter((c) => c).join(": "),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the .filter((c) => c) still necessary here? Since we're already checking if there's a value on line 601

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, because Use might be empty and then we don't want the : rendered

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ooh, good call! Thanks!!

@mcmcgrath13 mcmcgrath13 added this pull request to the merge queue Nov 21, 2024
Merged via the queue into main with commit 8cd1ce2 Nov 21, 2024
35 checks passed
@mcmcgrath13 mcmcgrath13 deleted the mcm/fix-pager branch November 21, 2024 21:04
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.

BUG: Pager phone type is missing from Patient Contact BUG: Empty line in patient contact info
2 participants