-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
1,499 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 45 additions & 45 deletions
90
packages/esm-patient-allergies-app/translations/pt_BR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
{ | ||
"add": "Add", | ||
"allergen": "Allergen", | ||
"allergies": "Allergies", | ||
"Allergies": "Allergies", | ||
"allergyDeleted": "Allergy deleted", | ||
"allergyIntolerances": "allergy intolerances", | ||
"allergyNowVisible": "It is now visible on the Allergies page", | ||
"allergySaved": "Allergy saved", | ||
"allergySaveError": "Error saving allergy", | ||
"allergyUpdated": "Allergy updated", | ||
"cancel": "Cancel", | ||
"dateOfOnsetAndComments": "Date of onset and comments", | ||
"delete": "Delete", | ||
"deleteModalConfirmationText": "Are you sure you want to delete this allergy?", | ||
"deletePatientAllergy": "Delete allergy", | ||
"deleting": "Deleting", | ||
"discard": "Discard", | ||
"edit": "Edit", | ||
"editAllergy": "Edit an Allergy", | ||
"editOrDeleteAllergy": "Edit or delete allergy", | ||
"errorDeletingAllergy": "Error deleting allergy", | ||
"invalidComment": "Invalid comment, try again", | ||
"loading": "Loading", | ||
"mild": "Mild", | ||
"moderate": "Moderate", | ||
"name": "Name", | ||
"nonCodedAllergenWarningDescription": "Adding a custom allergen may impact system-wide allergy notifications. It's recommended to choose from the provided list for accurate alerts. Custom entries may not trigger notifications in all relevant contexts.", | ||
"nonCodedAllergenWarningTitle": "Warning: Custom Allergen Entry", | ||
"onsetDateAndComments": "Onset date and comments", | ||
"other": "Other", | ||
"otherNonCodedAllergen": "Other non-coded allergen", | ||
"otherNonCodedAllergicReaction": "Other non-coded allergic reaction", | ||
"reaction": "Reaction", | ||
"reactions": "Reactions", | ||
"recordNewAllergy": "Record a new allergy", | ||
"saveAndClose": "Save and close", | ||
"seeAll": "See all", | ||
"selectAllergen": "Select the allergen", | ||
"selectReactions": "Select the reactions", | ||
"severe": "Severe", | ||
"severityandReaction": "Severity", | ||
"severityOfWorstReaction": "Severity of worst reaction", | ||
"typeAdditionalComments": "Type any additional comments here", | ||
"typeAllergenName": "Please type in the name of the allergen", | ||
"typeAllergicReactionName": "Please type in the name of the allergic reaction" | ||
"add": "Adicionar", | ||
"allergen": "Alérgeno", | ||
"allergies": "Alergias", | ||
"Allergies": "Alergias", | ||
"allergyDeleted": "Alergia excluída", | ||
"allergyIntolerances": "intolerâncias alérgicas", | ||
"allergyNowVisible": "Agora está visível na página de Alergias", | ||
"allergySaved": "Alergia gravada", | ||
"allergySaveError": "Erro ao gravar alergia", | ||
"allergyUpdated": "Alergia atualizada", | ||
"cancel": "Cancelar", | ||
"dateOfOnsetAndComments": "Data de início e comentários", | ||
"delete": "Apagar", | ||
"deleteModalConfirmationText": "Tem certeza de que deseja remover esta alergia?", | ||
"deletePatientAllergy": "Apagar alergia", | ||
"deleting": "Removendo", | ||
"discard": "Descartar", | ||
"edit": "Editar", | ||
"editAllergy": "Editar uma Alergia", | ||
"editOrDeleteAllergy": "Editar ou apagar alergia", | ||
"errorDeletingAllergy": "Erro ao apagar alergia", | ||
"invalidComment": "Comentário inválido, tente novamente", | ||
"loading": "Carregando", | ||
"mild": "Leve", | ||
"moderate": "Moderado", | ||
"name": "Nome", | ||
"nonCodedAllergenWarningDescription": "Adicionar um alérgeno personalizado pode afetar as notificações de alergia em todo o sistema. É recomendado escolher na lista correta fornecida para melhores alertas. As entradas personalizadas podem não acionar notificações em todos os contextos relevantes.", | ||
"nonCodedAllergenWarningTitle": "Aviso: Entrada personalizada de alérgenos", | ||
"onsetDateAndComments": "Data de início e comentários", | ||
"other": "Outro", | ||
"otherNonCodedAllergen": "Outro alergeno não codificado", | ||
"otherNonCodedAllergicReaction": "Outra reação alérgica não codificada", | ||
"reaction": "Reação", | ||
"reactions": "Reações", | ||
"recordNewAllergy": "Registar nova alergia", | ||
"saveAndClose": "Salvar e fechar", | ||
"seeAll": "Ver tudo", | ||
"selectAllergen": "Selecione o alérgeno", | ||
"selectReactions": "Selecione as reações", | ||
"severe": "Severa", | ||
"severityandReaction": "Gravidade", | ||
"severityOfWorstReaction": "Gravidade da pior reação", | ||
"typeAdditionalComments": "Descreva qualquer comentário adicional aqui", | ||
"typeAllergenName": "Por favor digite o nome do alérgeno", | ||
"typeAllergicReactionName": "Por favor digite o nome da reação alérgica" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...ges/esm-patient-chart-app/src/encounter-list/components/encounter-list-tabs.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import React, { useMemo } from 'react'; | ||
import { useConfig, usePatient, useVisit } from '@openmrs/esm-framework'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Tabs, Tab, TabList, TabPanels, TabPanel } from '@carbon/react'; | ||
import { EncounterList } from './encounter-list.component'; | ||
import { getMenuItemTabsConfiguration } from '../utils/encounter-list-config-builder'; | ||
import styles from './encounter-list-tabs.scss'; | ||
import { filter } from '../utils/helpers'; | ||
import { type Encounter } from '../types'; | ||
|
||
interface EncounterListTabsComponentProps { | ||
patientUuid: string; | ||
} | ||
|
||
const EncounterListTabsComponent: React.FC<EncounterListTabsComponentProps> = ({ patientUuid }) => { | ||
const config = useConfig(); | ||
const { tabDefinitions = [] } = config; | ||
const configConcepts = { | ||
trueConceptUuid: config.trueConceptUuid, | ||
falseConceptUuid: config.falseConceptUuid, | ||
otherConceptUuid: config.otherConceptUuid, | ||
}; | ||
const { t } = useTranslation(); | ||
const tabsConfig = getMenuItemTabsConfiguration(tabDefinitions, configConcepts); | ||
const patient = usePatient(patientUuid); | ||
const { currentVisit } = useVisit(patientUuid); | ||
const tabFilters = useMemo(() => { | ||
return tabsConfig.map((tab) => ({ | ||
name: tab.name, | ||
filter: tab.hasFilter ? (encounter: Encounter) => filter(encounter, tab.formList?.[0]?.uuid) : null, | ||
})); | ||
}, [tabsConfig]); | ||
|
||
return ( | ||
<div className={styles.tabContainer}> | ||
<Tabs> | ||
<TabList contained> | ||
{tabsConfig.map((tab) => ( | ||
<Tab key={tab.name}>{t(tab.name)}</Tab> | ||
))} | ||
</TabList> | ||
<TabPanels> | ||
{tabsConfig.map((tab) => { | ||
const tabFilter = tabFilters.find((t) => t.name === tab.name)?.filter; | ||
|
||
return ( | ||
<TabPanel key={tab.name}> | ||
<EncounterList | ||
filter={tabFilter} | ||
patientUuid={patientUuid} | ||
formList={tab.formList} | ||
columns={tab.columns} | ||
encounterType={tab.encounterType} | ||
launchOptions={tab.launchOptions} | ||
headerTitle={tab.headerTitle} | ||
description={tab.description} | ||
currentVisit={currentVisit} | ||
deathStatus={patient?.patient?.deceasedBoolean} | ||
/> | ||
</TabPanel> | ||
); | ||
})} | ||
</TabPanels> | ||
</Tabs> | ||
</div> | ||
); | ||
}; | ||
|
||
export default EncounterListTabsComponent; |
7 changes: 7 additions & 0 deletions
7
packages/esm-patient-chart-app/src/encounter-list/components/encounter-list-tabs.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.tabContainer div[role='tabpanel'] { | ||
padding: 0 !important; | ||
} | ||
|
||
.tabContainer li button { | ||
width: 100% !important; | ||
} |
Oops, something went wrong.