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 Patient Registration #3

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const searchRegistry = async (searchParams, advancedSearchParams) => {
let selectedRegistry = patientRegistries.filter((r) => r.name === registry);
if (selectedRegistry.length) {
if (identifier) {
urlParams = `?identifier=${identifier}`;
urlParams = `?identifier=${identifier.toUpperCase()}`;
} else {
const fields = [firstName, familyName, otherName].filter(Boolean);
const filledCount = fields.length;
Expand Down
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
4 changes: 3 additions & 1 deletion packages/esm-patient-registration-app/translations/am.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"negativeMonths": "",
"negativeYears": "",
"no": "No",
"No data": "No data to display",
"noMatchingRecordsFoundInRegistry": "No matching records found",
"noResultsFound": "No results found",
"numberInNameDubious": "",
Expand All @@ -84,7 +85,9 @@
"relativeNamePlaceholder": "Firstname Familyname",
"resetIdentifierTooltip": "Reset",
"restoreRelationshipActionButton": "Undo",
"search": "Search Registry",
"searchAddress": "Search address",
"searchThisList": "Search this list",
"selectAnOption": "Select an option",
"selectCountry": "Select Country",
"selectGender": "Select Gender",
Expand All @@ -96,7 +99,6 @@
"updatePatient": "Update Patient",
"updationSuccessToastDescription": "The patient's information has been successfully updated",
"updationSuccessToastTitle": "Patient Details Updated",
"verify": "Verify",
"yearsEstimateRequired": "",
"yes": "Yes"
}
4 changes: 3 additions & 1 deletion packages/esm-patient-registration-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"negativeMonths": "Negative months",
"negativeYears": "Negative years",
"no": "No",
"No data": "No data to display",
"noMatchingRecordsFoundInRegistry": "No matching records found",
"noResultsFound": "No results found",
"numberInNameDubious": "Number in name is dubious",
Expand All @@ -84,7 +85,9 @@
"relativeNamePlaceholder": "Firstname Familyname",
"resetIdentifierTooltip": "Reset",
"restoreRelationshipActionButton": "Undo",
"search": "Search Registry",
"searchAddress": "Search address",
"searchThisList": "Search this list",
"selectAnOption": "Select an option",
"selectCountry": "Select country",
"selectGender": "Select Gender",
Expand All @@ -96,7 +99,6 @@
"updatePatient": "Update Patient",
"updationSuccessToastDescription": "The patient's information has been successfully updated",
"updationSuccessToastTitle": "Patient Details Updated",
"verify": "Verify",
"yearsEstimateRequired": "Years estimate required",
"yes": "Yes"
}
4 changes: 3 additions & 1 deletion packages/esm-patient-registration-app/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"negativeMonths": "",
"negativeYears": "",
"no": "No",
"No data": "No data to display",
"noMatchingRecordsFoundInRegistry": "No matching records found",
"noResultsFound": "No results found",
"numberInNameDubious": "",
Expand All @@ -84,7 +85,9 @@
"relativeNamePlaceholder": "Firstname Familyname",
"resetIdentifierTooltip": "Reset",
"restoreRelationshipActionButton": "Undo",
"search": "Search Registry",
"searchAddress": "Search address",
"searchThisList": "Search this list",
"selectAnOption": "Select an option",
"selectCountry": "Select Country",
"selectGender": "Select Gender",
Expand All @@ -96,7 +99,6 @@
"updatePatient": "Update Patient",
"updationSuccessToastDescription": "The patient's information has been successfully updated",
"updationSuccessToastTitle": "Patient Details Updated",
"verify": "Verify",
"yearsEstimateRequired": "",
"yes": "Yes"
}
4 changes: 3 additions & 1 deletion packages/esm-patient-registration-app/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"negativeMonths": "Mois négatifs",
"negativeYears": "Années négatives",
"no": "Non",
"No data": "No data to display",
"noMatchingRecordsFoundInRegistry": "No matching records found",
"noResultsFound": "Aucun résultat trouvé",
"numberInNameDubious": "Le chiffre dans le nom est suspect",
Expand All @@ -84,7 +85,9 @@
"relativeNamePlaceholder": "Prénom Nom de famile",
"resetIdentifierTooltip": "Réinitialiser",
"restoreRelationshipActionButton": "Annuler",
"search": "Search Registry",
"searchAddress": "Chercher l'adresse",
"searchThisList": "Search this list",
"selectAnOption": "Select an option",
"selectCountry": "Select Country",
"selectGender": "Select Gender",
Expand All @@ -96,7 +99,6 @@
"updatePatient": "Mettre à jour le patient",
"updationSuccessToastDescription": "Les informations du patient ont été mises à jour avec succès",
"updationSuccessToastTitle": "Les informations du patients ont été mises à jour",
"verify": "Verify",
"yearsEstimateRequired": "Estimation du nombre d'années requise",
"yes": "Oui"
}
4 changes: 3 additions & 1 deletion packages/esm-patient-registration-app/translations/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"negativeMonths": "חודשים שליליים",
"negativeYears": "שנים שליליות",
"no": "לא",
"No data": "No data to display",
"noMatchingRecordsFoundInRegistry": "No matching records found",
"noResultsFound": "לא נמצאו תוצאות",
"numberInNameDubious": "מספר בשם חשוד",
Expand All @@ -84,7 +85,9 @@
"relativeNamePlaceholder": "שם פרטי שם משפחה",
"resetIdentifierTooltip": "איפוס",
"restoreRelationshipActionButton": "ביטול",
"search": "Search Registry",
"searchAddress": "חיפוש כתובת",
"searchThisList": "Search this list",
"selectAnOption": "Select an option",
"selectCountry": "Select Country",
"selectGender": "Select Gender",
Expand All @@ -96,7 +99,6 @@
"updatePatient": "עדכון פרטי מטופל",
"updationSuccessToastDescription": "פרטי המטופל עודכנו בהצלחה",
"updationSuccessToastTitle": "פרטי המטופל עודכנו",
"verify": "Verify",
"yearsEstimateRequired": "נדרש חיזוי שנים",
"yes": "כן"
}
4 changes: 3 additions & 1 deletion packages/esm-patient-registration-app/translations/km.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"negativeMonths": "ខែអវិជ្ជមាន",
"negativeYears": "ឆ្នាំអវិជ្ជមាន",
"no": "ទេ",
"No data": "No data to display",
"noMatchingRecordsFoundInRegistry": "No matching records found",
"noResultsFound": "រកមិនឃើញលទ្ធផលទេ",
"numberInNameDubious": "លេខគឺជាឈ្មោះគួរឱ្យសង្ស័យ",
Expand All @@ -84,7 +85,9 @@
"relativeNamePlaceholder": "នាមត្រកូលនាមខ្លួន",
"resetIdentifierTooltip": "រៀបចំឡើងវិញ",
"restoreRelationshipActionButton": "វិលត្រឡប់មកដើមវិញ",
"search": "Search Registry",
"searchAddress": "ស្វែងរកអាសយដ្ឋាន",
"searchThisList": "Search this list",
"selectAnOption": "Select an option",
"selectCountry": "Select Country",
"selectGender": "Select Gender",
Expand All @@ -96,7 +99,6 @@
"updatePatient": "ធ្វើបច្ចុប្បន្នភាពអ្នកជំងឺ",
"updationSuccessToastDescription": "ព័ត៌មានរបស់អ្នកជំងឺត្រូវបានធ្វើបច្ចុប្បន្នភាពដោយជោគជ័យ",
"updationSuccessToastTitle": "ព័ត៌មានលម្អិតអំពីអ្នកជំងឺត្រូវបានធ្វើបច្ចុប្បន្នភាព",
"verify": "Verify",
"yearsEstimateRequired": "តម្រូវ​ឱ្យ​មាន​ការ​ប៉ាន់ស្មាន​ឆ្នាំ",
"yes": "បាទ/ចាស"
}
Loading