Skip to content

Commit

Permalink
fix: knip issues
Browse files Browse the repository at this point in the history
  • Loading branch information
naftis committed Nov 12, 2024
1 parent 40fdee7 commit 5a3798f
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions packages/workflow/src/features/registration/fhir/fhir-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
Composition,
OpenCRVSPatientName,
Patient,
Resource,
Saved,
Task,
findExtension,
Expand Down Expand Up @@ -64,7 +63,7 @@ export async function getSharedContactEmail(fhirBundle: Bundle) {
)
}

export function concatenateName(fhirNames: OpenCRVSPatientName[]) {
function concatenateName(fhirNames: OpenCRVSPatientName[]) {
const language = getDefaultLanguage()
const name = fhirNames.find((humanName: OpenCRVSPatientName) => {
return humanName.use === language
Expand Down Expand Up @@ -261,28 +260,6 @@ export async function postToHearth(payload: any) {
return res.json()
}

export async function updateResourceInHearth(resource: Resource) {
const res = await fetch(
`${FHIR_URL}/${resource.resourceType}/${resource.id}`,
{
method: 'PUT',
body: JSON.stringify(resource),
headers: {
'Content-Type': 'application/fhir+json'
}
}
)
if (!res.ok) {
throw new Error(
`FHIR update to ${resource.resourceType} failed with [${
res.status
}] body: ${await res.text()}`
)
}

return res.text()
}

//TODO: need to modifty for marriage event
export function getPhoneNo(taskResource: Task, eventType: EVENT_TYPE) {
let phoneNumber
Expand Down

0 comments on commit 5a3798f

Please sign in to comment.