Skip to content

Commit

Permalink
Remove deceased boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
akileng56 committed Oct 26, 2023
1 parent 88e9387 commit 98e8596
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function handleRegistryResponse(clientResponse: RegistryResponse, props:
});
} else if (clientResponse?.total === 1) {
const {
resource: { identifier, name, gender, birthDate, deceasedBoolean, address },
resource: { identifier, name, gender, birthDate, address },
} = clientResponse.entry[0];

const { family, given } = name[0];
Expand Down Expand Up @@ -79,7 +79,6 @@ export function handleRegistryResponse(clientResponse: RegistryResponse, props:
givenName: given[0],
gender: gender === 'male' ? 'Male' : 'Female',
birthdate: new Date(birthDate),
isDead: deceasedBoolean,
address: {
address1: city,
country: country,
Expand All @@ -95,7 +94,7 @@ export function handleRegistryResponse(clientResponse: RegistryResponse, props:
let patientData = [];
clientResponse?.entry?.map((registryPatient) => {
const {
resource: { name, gender, birthDate, deceasedBoolean, address },
resource: { name, gender, birthDate, address },
} = registryPatient;
const { family, given } = name[0];
const { city, country } = address[0];
Expand All @@ -113,7 +112,6 @@ export function handleRegistryResponse(clientResponse: RegistryResponse, props:
givenName: given[0],
gender: gender === 'male' ? 'Male' : 'Female',
birthdate: new Date(birthDate),
isDead: deceasedBoolean,
address: {
address1: city,
country: country,
Expand Down Expand Up @@ -212,7 +210,6 @@ export function generateFHIRPayload(formValues: FormValues): ClientPostBody {
],
gender: formValues?.gender.toLowerCase(),
birthDate: new Date(formValues?.birthdate).toISOString(),
deceasedBoolean: !formValues?.isDead,
address: [extractAddress(formValues.address)],
identifier: extractIdentifiers(formValues.identifiers),
resourceType: 'Patient',
Expand Down

0 comments on commit 98e8596

Please sign in to comment.