Skip to content

Commit

Permalink
Merge branch 'main' into 1501-add-script
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki authored Dec 18, 2024
2 parents 7136650 + b6969cf commit da57034
Show file tree
Hide file tree
Showing 33 changed files with 255 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const keyValueDetailRender = (obj: IGroup, t: TFunction) => {
[t('Id')]: id,
[t('Name')]: name,
[t('Active')]: active ? t('Active') : t('Inactive'),
[t('Last updated')]: t('{{val, datetime}}', { val: new Date(lastUpdated) }),
[t('Last Updated')]: t('{{val, datetime}}', { val: new Date(lastUpdated) }),
[t('No. of Members')]: quantity,
[t('Members')]: members?.map((member) => member.entity.display).join(', '),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ exports[`renders correctly when listing resources 6`] = `
class="singleKeyValue-pair__default"
>
<dt>
Last updated
Last Updated
</dt>
<dd>
4/27/2022
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { authenticateUser } from '@onaio/session-reducer';
import { Route, Router, Switch } from 'react-router';
import nock from 'nock';
import * as reactQuery from 'react-query';
import { waitForElementToBeRemoved, render, cleanup } from '@testing-library/react';
import { waitForElementToBeRemoved, render, cleanup, screen } from '@testing-library/react';
import { store } from '@opensrp/store';
import * as constants from '../../../constants';
import { createMemoryHistory } from 'history';
Expand Down Expand Up @@ -100,11 +100,11 @@ describe('Care Teams list view', () => {
await waitForElementToBeRemoved(document.querySelector('.ant-spin'));
expect(nock.pendingMocks()).toEqual([]);

expect(document.querySelector('title')).toMatchInlineSnapshot(`
<title>
View details | 26aae779-0e6f-482d-82c3-a0fad1fd3689_orgToLocationAssignment
</title>
`);
expect(
screen.getByTitle(
'View details | 26aae779-0e6f-482d-82c3-a0fad1fd3689_orgToLocationAssignment'
)
).toBeInTheDocument();

expect(
(document.querySelector('.view-details-container') as HTMLElement).textContent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const DataImportForm = (props: DataImportFormProps) => {
{
formFieldName: orgToLocationAssignment,
label: t('Organization location assignment'),
UploadBtnText: 'Attach assignment file',
UploadBtnText: t('Attach assignment file'),
permissions: ['OrganizationAffiliation.create', 'OrganizationAffiliation.update'],
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/fhir-import/src/mls.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useTranslation as useOrigTranslation } from '@opensrp/i18n';
import type { UseTranslationOptions } from '@opensrp/i18n';

export const namespace = 'fhir-views';
export const namespace = 'fhir-import';

export const useTranslation = (ns?: string, options?: UseTranslationOptions) => {
return useOrigTranslation(ns ? ns : namespace, options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export const practitionerUpdater =
{
use: IdentifierUseCodes.OFFICIAL,
family: values.lastName,
given: [values.firstName, ''],
given: values.firstName ? [values.firstName] : [],
},
],
telecom: values.phoneNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const newPractitioner = {
},
],
active: true,
name: [{ use: 'official', family: 'plotus', given: ['flotus', ''] }],
name: [{ use: 'official', family: 'plotus', given: ['flotus'] }],
telecom: [{ system: 'email', value: '[email protected]' }],
};

Expand All @@ -84,7 +84,7 @@ export const newPractitionerRole = {
active: true,
practitioner: {
reference: 'Practitioner/c1d36d9a-b771-410b-959e-af2c04d132a2',
display: 'Demoflotus kenyaplotus',
display: 'Demoflotus kenyaplotus',
},
code: [
{
Expand Down Expand Up @@ -189,7 +189,7 @@ export const updatedPractitioner = {
},
],
active: true,
name: [{ use: 'official', family: 'kenyaplotus', given: ['Demoflotus', ''] }],
name: [{ use: 'official', family: 'kenyaplotus', given: ['Demoflotus'] }],
telecom: [{ system: 'email', value: '[email protected]@plotus.duck' }],
};

Expand Down Expand Up @@ -228,7 +228,7 @@ export const extraFieldsPractitioner = {
},
],
active: true,
name: [{ use: 'official', family: 'kenyaplotus', given: ['Demoflotus', ''] }],
name: [{ use: 'official', family: 'kenyaplotus', given: ['Demoflotus'] }],
telecom: [
{ system: 'email', value: '[email protected]@plotus.duck' },
{ system: 'phone', value: '0700123456', use: 'mobile' },
Expand Down Expand Up @@ -270,7 +270,7 @@ export const updatedExtraFieldsPractitioner = {
},
],
active: true,
name: [{ use: 'official', family: 'plotus', given: ['flotus', ''] }],
name: [{ use: 'official', family: 'plotus', given: ['flotus'] }],
telecom: [
{ system: 'email', value: '[email protected]' },
{ system: 'phone', value: '0700123456', use: 'mobile' },
Expand Down Expand Up @@ -450,7 +450,7 @@ export const updatedPractitionerRole = {
active: true,
practitioner: {
reference: 'Practitioner/c1d36d9a-b771-410b-959e-af2c04d132a2',
display: 'Demoflotus kenyaplotus',
display: 'Demoflotus kenyaplotus',
},
code: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ import { BodyLayout } from '@opensrp/react-utils';
import { getExtraData } from '@onaio/session-reducer';
import { KeycloakUser } from '@opensrp/user-management';
import { useSelector } from 'react-redux';
import { Trans, useTranslation } from '@opensrp/i18n';
import { Trans } from '@opensrp/i18n';
import { RbacCheck, useUserRole } from '@opensrp/rbac';
import { UserDetailsOverview } from '../ViewdetailsOverview';
import { useTranslation } from '../../../mls';

interface OrganizationListProps {
fhirBaseURL: string;
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/locales/eusm/app/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"All Locations": "All Locations",
"Care Teams Management": "Care Teams Management",
"Commodity Management": "Product Catalogue",
"Data Imports": "Data imports",
"Group Management": "Group Management",
"Healthcare Services": "Healthcare Services",
"Hierarchy": "Hierarchy",
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/locales/eusm/app/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"All Locations": "Tous les lieux",
"Care Teams Management": "Gestion du Care Teams",
"Commodity Management": "Catalogue des Produits",
"Data Imports": "Importation des données",
"Group Management": "Gestion du groupe",
"Healthcare Services": "Centre de santé",
"Hierarchy": "Hierarchie",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/locales/eusm/fhir-care-team/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
"Successfully updated CareTeams": "Successfully updated CareTeams",
"There was a problem creating the Care Team": "There was a problem creating the Care Team",
"There was a problem deleting the Care Team": "There was a problem deleting the Care Team",
"There was a problem fetching organizations": "There was a problem fetching organizations",
"There was a problem fetching practitioners": "There was a problem fetching practitioners",
"There was a problem fetching the Care Team": "There was a problem fetching the Care Team",
"There was a problem updating the Care Team": "There was a problem updating the Care Team",
"UUID": "UUID",
Expand Down
2 changes: 0 additions & 2 deletions packages/i18n/locales/eusm/fhir-care-team/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
"Successfully updated CareTeams": "Mise à jour réussi de Care Teams",
"There was a problem creating the Care Team": "Un problème est survenu lors de la création de la Care Team",
"There was a problem deleting the Care Team": "Un problème est survenu lors de la suppression de la Care Team",
"There was a problem fetching organizations": "Un problème est survenu lors de la recherche de l'organisation",
"There was a problem fetching practitioners": "Il y a eu un problème pour trouver des praticiens.",
"There was a problem fetching the Care Team": "Un problème est survenu lors de la recherche de la Care Team",
"There was a problem updating the Care Team": "Un problème est survenu lors de la mise à jour du Care Team",
"UUID": "UUID",
Expand Down
37 changes: 33 additions & 4 deletions packages/i18n/locales/eusm/fhir-client/en.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,51 @@
{
"{{val, datetime}}": "{{val, datetime}}",
"Abatement date": "",
"Achievement status": "Achievement status",
"Actions": "Actions",
"Active": "Active",
"Address": "Address",
"Administration Date": "Administration Date",
"Authored on": "Authored on",
"Birth Date": "Birth Date",
"Business status": "",
"Canonical (PlanDefinition)": "",
"Care plan": "",
"Category": "Category",
"City": "City",
"Class": "Class",
"Clinical status": "",
"Conclusion": "Conclusion",
"Condition": "Condition",
"Context": "Context",
"Country": "Country",
"Created at": "Created at",
"Date asserted": "Date asserted",
"Date authored": "Date authored",
"Date created": "",
"Date Created": "Date Created",
"Date issued": "Date issued",
"Date of birth": "",
"Date Of Birth": "Date Of Birth",
"Date recorded": "",
"Deceased": "Deceased",
"Description": "Description",
"Details": "Details",
"Document type": "Document type",
"Dose quantity": "",
"Encounter Duration": "",
"Episode of care": "",
"Event": "Event",
"Facility": "Facility",
"Fetching Patient details": "",
"First name": "",
"Format": "Format",
"Gender": "Gender",
"Id": "Id",
"ID": "ID",
"Immunization": "",
"Inactive": "Inactive",
"Intent": "",
"Last name": "",
"Manufacturer": "Manufacturer",
"Medication": "Medication",
"MRN": "MRN",
Expand All @@ -40,27 +55,41 @@
"Observation Issue Date": "Observation Issue Date",
"Observation value": "Observation value",
"Occurence Date": "Occurence Date",
"Patient Details": "Patient Details",
"Onset date": "",
"Patient encounter": "",
"Patient profile": "",
"Patients": "Patients",
"Performed Date": "Performed Date",
"Period": "Period",
"Phone": "Phone",
"Practice Setting": "Practice Setting",
"Preview/Download": "Preview/Download",
"Primary source": "",
"Priority": "Priority",
"Procedure": "Procedure",
"protocol applied": "",
"reason": "",
"Reason": "Reason",
"Report origin": "",
"S.no": "S.no",
"Security label": "Security label",
"Service provider": "",
"Service type": "",
"Service Type": "",
"Severity": "Severity",
"stage": "",
"State": "State",
"status": "",
"Status": "Status",
"There was a problem fetching the patient": "There was a problem fetching the patient",
"Task": "",
"Title": "Title",
"Type": "Type",
"UUID": "UUID",
"Vaccine Admnistered": "Vaccine Admnistered",
"Vaccine expiry date": "",
"Verification status": "",
"Verification Status": "Verification Status",
"View": "View",
"Work in progress": "Work in progress"
"View details": "",
"View full details": ""
}
63 changes: 46 additions & 17 deletions packages/i18n/locales/eusm/fhir-client/fr.json
Original file line number Diff line number Diff line change
@@ -1,66 +1,95 @@
{
"{{val, datetime}}": "{{val, datetime}}",
"Achievement status": "Etat d'avancement",
"Abatement date": "Date d'annulation",
"Achievement status": "État d'avancement",
"Actions": "Actions",
"Active": "Actif",
"Address": "Adresse",
"Administration Date": "Date d'administration",
"Authored on": "Auteur de",
"Birth Date": "Date de naissance",
"Business status": "Statut de l'entreprise",
"Canonical (PlanDefinition)": "Canonique (PlanDefinition)",
"Care plan": "Plan de soins",
"Category": "Catégorie",
"City": "Ville",
"Class": "Catégorie",
"Conclusion": "Conlusion",
"Clinical status": "État clinique",
"Conclusion": "Conclusion",
"Condition": "Condition",
"Context": "Contexte",
"Country": "Pays",
"Created at": "Créé au",
"Date asserted": "Données validées",
"Created at": "Créé à",
"Date asserted": "Date de l'affirmation",
"Date authored": "Date de la création",
"Date created": "Date de création",
"Date Created": "Date de création",
"Date issued": "Date d'émission",
"Date of birth": "Date de naissance",
"Date Of Birth": "Date de naissance",
"Date recorded": "Date d'enregistrement",
"Deceased": "Décédé",
"Description": "Description",
"Details": "Détails",
"Document type": "Type de document",
"Event": "Evènement",
"Dose quantity": "Quantité de doses",
"Encounter Duration": "Durée de la rencontre",
"Episode of care": "Épisode de soins",
"Event": "Événement",
"Facility": "Facilité",
"Fetching Patient details": "Récupération des données du patient",
"First name": "Prénom",
"Format": "Format",
"Gender": "Genre",
"Id": "ID",
"ID": "ID",
"Immunization": "Immunisation",
"Inactive": "Inactif",
"Manufacturer": "Fabrication",
"Intent": "Intention",
"Last name": "Nom",
"Manufacturer": "Fabricant",
"Medication": "Médicaments",
"MRN": "MRN",
"Name": "Prénom",
"Next Dose Date": "Date de la prochaine dose",
"Number of doses": "Nombre de doses",
"Observation Issue Date": "Date d'émission de l'observation",
"Observation value": "Valeur observée",
"Occurence Date": "Date de survenance",
"Patient Details": "Informations sur le patient",
"Observation value": "Valeur d'observation",
"Occurence Date": "Date de l'événement",
"Onset date": "Date de début",
"Patient encounter": "Rencontre avec le patient",
"Patient profile": "Profil du patient",
"Patients": "Patients",
"Performed Date": "Date de réalisation",
"Performed Date": "Date d'exécution",
"Period": "Période",
"Phone": "Téléphone",
"Practice Setting": "Cadre de la pratique",
"Preview/Download": "Aperçu/Téléchargement",
"Preview/Download": "Prévisualisation/téléchargement",
"Primary source": "Source primaire",
"Priority": "Priorité",
"Procedure": "Procédure",
"Reason": "Raison",
"protocol applied": "protocole appliqué",
"reason": "raison",
"Reason": "raison",
"Report origin": "Origine du rapport",
"S.no": "S.no",
"Security label": "Étiquette de sécurité",
"Severity": "Gravité",
"Service provider": "Prestataire de services",
"Service type": "Type de service",
"Service Type": "Type de service",
"Severity": "Sévérité",
"stage": "étape",
"State": "État",
"status": "Statut",
"Status": "Statut",
"There was a problem fetching the patient": "Un problème est survenu lors de la recherche du patient",
"Task": "Tâche",
"Title": "Titre",
"Type": "Type",
"UUID": "UUID",
"Vaccine Admnistered": "Vaccin administré",
"Verification Status": "Etat de la vérification",
"Vaccine expiry date": "Date d'expiration du vaccin",
"Verification status": "Statut de vérification",
"Verification Status": "Statut de vérification",
"View": "Voir",
"Work in progress": "Travaux en cours"
"View details": "Voir les détails",
"View full details": "Voir tous les détails"
}
1 change: 1 addition & 0 deletions packages/i18n/locales/eusm/fhir-flag/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"Inactive": "",
"Invalid Flag": "",
"Missing location field. This information is required to close the flag form.": "",
"Missing Required permissions to perform this action": "",
"Product": "",
"Save": "",
"Saving": "",
Expand Down
Loading

0 comments on commit da57034

Please sign in to comment.