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 fax to contact points #2863

Merged
merged 18 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions containers/ecr-viewer/src/app/services/formatService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,13 @@ export const formatContactPoint = (
);
} else if (contactPoint.system === "email" && contactPoint.value) {
contactArr.push(contactPoint.value);
} else if (contactPoint.system === "fax" && contactPoint.value) {
const faxNumberUse = toSentenceCase(contactPoint.use ?? "");
contactArr.push(
[faxNumberUse, "Fax:", formatPhoneNumber(contactPoint.value ?? "")]
.join(" ")
.trim(),
);
}
}
return contactArr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,21 @@ describe("formatContactPoint", () => {
const actual = formatContactPoint(contactPoints);
expect(actual).toEqual(["me@example.com", "medicine@example.com"]);
});
it("should return fax information ", () => {
const contactPoints: ContactPoint[] = [
{
system: "fax",
value: "+13135551234",
use: "work",
},
{
system: "fax",
value: "+1 313 555-1235",
},
];
const actual = formatContactPoint(contactPoints);
expect(actual).toEqual(["Work Fax: 313-555-1234", "Fax: 313-555-1235"]);
});
});

describe("formatPhoneNumber", () => {
Expand Down
2 changes: 1 addition & 1 deletion containers/fhir-converter/Dockerfile
Original file line number Diff line number Diff line change
@@ -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-3 --single-branch /build/FHIR-Converter
RUN git clone https://github.com/skylight-hq/FHIR-Converter.git --branch mcm/ecr-provider-fax --single-branch /build/FHIR-Converter
mcmcgrath13 marked this conversation as resolved.
Show resolved Hide resolved

WORKDIR /build/FHIR-Converter

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,11 @@
'use': 'work',
'value': '(661)382-5000',
}),
dict({
'system': 'fax',
'use': 'work',
'value': '(661)382-5001',
}),
]),
}),
}),
Expand Down

Large diffs are not rendered by default.

Loading