From df90113d1ac5d1c4a92a88e747f7baca4347e89e Mon Sep 17 00:00:00 2001 From: Brandon Istenes Date: Tue, 24 May 2022 10:32:43 -0700 Subject: [PATCH 1/6] Start adding support for registration observations --- .../src/config-schema.ts | 7 ++++ .../field/custom-field.component.tsx | 8 +++- .../field/field.resource.ts | 35 ++++++++++++++++ .../field/obs/obs-field.component.tsx | 40 +++++++++++++++++++ ...coded-person-attribute-field.component.tsx | 2 +- .../person-attributes.resource.tsx | 18 +-------- 6 files changed, 91 insertions(+), 19 deletions(-) create mode 100644 packages/esm-patient-registration-app/src/patient-registration/field/field.resource.ts create mode 100644 packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx diff --git a/packages/esm-patient-registration-app/src/config-schema.ts b/packages/esm-patient-registration-app/src/config-schema.ts index 6a190af03..cc050cf5a 100644 --- a/packages/esm-patient-registration-app/src/config-schema.ts +++ b/packages/esm-patient-registration-app/src/config-schema.ts @@ -96,6 +96,13 @@ export const esmPatientRegistrationSchema = { _description: 'How this field will be referred to in the `fields` element of the `sectionDefinitions` configuration.', }, + type: { + _type: Type.String, + _description: "How this field's data will be stored—a person attribute or an obs.", + _validators: [ + validator((val) => ['person attribute', 'obs'].includes(val), "Must be one of 'person attribute' or 'obs'."), + ], + }, uuid: { _type: Type.UUID, _description: "Person attribute type UUID that this field's data should be saved to.", diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/custom-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/custom-field.component.tsx index cbdc6be00..da730f374 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/custom-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/custom-field.component.tsx @@ -11,5 +11,11 @@ export function CustomField({ name }: CustomFieldProps) { const config = useConfig() as RegistrationConfig; const fieldDefinition = config.fieldDefinitions.filter((def) => def.id == name)[0]; - return ; + if (fieldDefinition.type === 'person attribute') { + return ; + } else if (fieldDefinition.type === 'obs') { + return ; + } else { + return
Error: Unknown field type {fieldDefinition.type}
; + } } diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/field.resource.ts b/packages/esm-patient-registration-app/src/patient-registration/field/field.resource.ts new file mode 100644 index 000000000..78af78ed5 --- /dev/null +++ b/packages/esm-patient-registration-app/src/patient-registration/field/field.resource.ts @@ -0,0 +1,35 @@ +import { FetchResponse, openmrsFetch, showToast } from '@openmrs/esm-framework'; +import useSWRImmutable from 'swr/immutable'; +import { ConceptAnswers, ConceptResponse } from '../patient-registration-types'; + +export function useConcept(conceptUuid: string): { data: ConceptResponse; isLoading: boolean } { + const shouldFetch = typeof conceptUuid === 'string' && conceptUuid !== ''; + const { data, error } = useSWRImmutable, Error>( + shouldFetch ? `/ws/rest/v1/concept/${conceptUuid}` : null, + openmrsFetch, + ); + if (error) { + showToast({ + title: error.name, + description: error.message, + kind: 'error', + }); + } + return { data: data?.data, isLoading: !data && !error }; +} + +export function useConceptAnswers(conceptUuid: string): { data: Array; isLoading: boolean } { + const shouldFetch = typeof conceptUuid === 'string' && conceptUuid !== ''; + const { data, error } = useSWRImmutable, Error>( + shouldFetch ? `/ws/rest/v1/concept/${conceptUuid}` : null, + openmrsFetch, + ); + if (error) { + showToast({ + title: error.name, + description: error.message, + kind: 'error', + }); + } + return { data: data?.data?.answers, isLoading: !data && !error }; +} diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx new file mode 100644 index 000000000..59efe97bf --- /dev/null +++ b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx @@ -0,0 +1,40 @@ +import { InlineNotification } from 'carbon-components-react'; +import React from 'react'; +import { FieldDefinition } from '../../../config-schema'; +import { useConcept } from '../field.resource'; + +export interface ObsFieldProps { + fieldDefinition: FieldDefinition; +} + +export function ObsField({ fieldDefinition }: ObsFieldProps) { + const { data: concept, isLoading } = useConcept(fieldDefinition.uuid); + + if (isLoading) { + return null; + } + switch (concept.) { + case 'java.lang.String': + return ( + + ); + case 'org.openmrs.Concept': + return ( + + ); + default: + return ( + + Patient attribute type has unknown format "{personAttributeType.format}" + + ); + } +} \ No newline at end of file diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx index d868802aa..edf780b73 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx @@ -2,7 +2,7 @@ import React from 'react'; import styles from './../field.scss'; import { Input } from '../../input/basic-input/input/input.component'; import { Select, SelectItem } from 'carbon-components-react'; -import { useConceptAnswers } from './person-attributes.resource'; +import { useConceptAnswers } from '../field.resource'; import { PersonAttributeTypeResponse } from '../../patient-registration-types'; export interface CodedPersonAttributeFieldProps { diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/person-attributes.resource.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/person-attributes.resource.tsx index 47347c6a2..964625657 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/person-attributes.resource.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/person-attributes.resource.tsx @@ -1,6 +1,6 @@ import { FetchResponse, openmrsFetch, showToast } from '@openmrs/esm-framework'; import useSWRImmutable from 'swr/immutable'; -import { ConceptAnswers, ConceptResponse, PersonAttributeTypeResponse } from '../../patient-registration-types'; +import { PersonAttributeTypeResponse } from '../../patient-registration-types'; export function usePersonAttributeType(personAttributeTypeUuid: string): { data: PersonAttributeTypeResponse; @@ -22,19 +22,3 @@ export function usePersonAttributeType(personAttributeTypeUuid: string): { isLoading: !data && !error, }; } - -export function useConceptAnswers(conceptUuid: string): { data: Array; isLoading: boolean } { - const shouldFetch = typeof conceptUuid === 'string' && conceptUuid !== ''; - const { data, error } = useSWRImmutable, Error>( - shouldFetch ? `/ws/rest/v1/concept/${conceptUuid}` : null, - openmrsFetch, - ); - if (error) { - showToast({ - title: error.name, - description: error.message, - kind: 'error', - }); - } - return { data: data?.data?.answers, isLoading: !data && !error }; -} From 1cefeed6ba0b58b4252bf8005cf3151d027c8c55 Mon Sep 17 00:00:00 2001 From: Brandon Istenes Date: Wed, 25 May 2022 11:27:55 -0700 Subject: [PATCH 2/6] WIP --- .../src/config-schema.ts | 30 +++++- .../src/offline.ts | 1 + .../src/patient-registration/field/field.scss | 2 +- .../field/obs/obs-field.component.tsx | 94 ++++++++++++++-- ...coded-person-attribute-field.component.tsx | 2 +- .../text-person-attribute-field.component.tsx | 2 +- .../src/patient-registration/form-manager.ts | 102 +++++++++++++----- .../patient-registration-types.tsx | 8 ++ 8 files changed, 199 insertions(+), 42 deletions(-) diff --git a/packages/esm-patient-registration-app/src/config-schema.ts b/packages/esm-patient-registration-app/src/config-schema.ts index cc050cf5a..0d496601e 100644 --- a/packages/esm-patient-registration-app/src/config-schema.ts +++ b/packages/esm-patient-registration-app/src/config-schema.ts @@ -38,6 +38,11 @@ export interface RegistrationConfig { patientPhotoUuid: string; }; defaultPatientIdentifierTypes: Array; + registrationObs: { + encounterTypeUuid: string | null; + encounterProviderRoleUuid: string; + registrationFormUuid: string | null; + }; } export const builtInSections: Array = [ @@ -169,7 +174,6 @@ export const esmPatientRegistrationSchema = { _default: '736e8771-e501-4615-bfa7-570c03f4bef5', }, }, - defaultPatientIdentifierTypes: { _type: Type.Array, _elements: { @@ -177,4 +181,28 @@ export const esmPatientRegistrationSchema = { }, _default: [], }, + registrationObs: { + encounterTypeUuid: { + _type: Type.UUID, + _default: null, + _description: + 'Obs created during registration will be associated with an encounter of this type. This must be set in order to use fields of type `obs`.', + }, + encounterProviderRoleUuid: { + _type: Type.UUID, + _default: 'a0b03050-c99b-11e0-9572-0800200c9a66', + _description: "The provider role to use for the registration encounter. Default is 'Unkown'.", + }, + registrationFormUuid: { + _type: Type.UUID, + _default: null, + _description: + 'The form UUID to associate with the registration encounter. By default no form will be associated.', + }, + }, + + // TODO: validate that + // - if a field has type 'obs', registrationObs.encounterTypeUuid is not null + // - all sections have been defined + // - all fields have been defined }; diff --git a/packages/esm-patient-registration-app/src/offline.ts b/packages/esm-patient-registration-app/src/offline.ts index 5647db9db..99e8218d6 100644 --- a/packages/esm-patient-registration-app/src/offline.ts +++ b/packages/esm-patient-registration-app/src/offline.ts @@ -62,6 +62,7 @@ export async function syncPatientRegistration( queuedPatient: PatientRegistration, options: SyncProcessOptions, ) { + // TODO: fix the arguments await FormManager.savePatientFormOnline( queuedPatient._patientRegistrationData.isNewPatient, queuedPatient._patientRegistrationData.formValues, diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/field.scss b/packages/esm-patient-registration-app/src/patient-registration/field/field.scss index e1ec261e7..a42a1a72f 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/field.scss +++ b/packages/esm-patient-registration-app/src/patient-registration/field/field.scss @@ -83,7 +83,7 @@ margin-left: $spacing-03; } -.attributeField { +.customField { margin-bottom: $spacing-05; } diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx index 59efe97bf..999039b7c 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx @@ -1,7 +1,12 @@ -import { InlineNotification } from 'carbon-components-react'; +import { InlineNotification, Select, SelectItem } from 'carbon-components-react'; +import { Field } from 'formik'; import React from 'react'; +import { useTranslation } from 'react-i18next'; import { FieldDefinition } from '../../../config-schema'; -import { useConcept } from '../field.resource'; +import { Input } from '../../input/basic-input/input/input.component'; +import { ConceptResponse } from '../../patient-registration-types'; +import { useConcept, useConceptAnswers } from '../field.resource'; +import styles from './../field.scss'; export interface ObsFieldProps { fieldDefinition: FieldDefinition; @@ -13,19 +18,19 @@ export function ObsField({ fieldDefinition }: ObsFieldProps) { if (isLoading) { return null; } - switch (concept.) { - case 'java.lang.String': + switch (concept.datatype.display) { + case 'Text': return ( - ); - case 'org.openmrs.Concept': + case 'Coded': return ( - @@ -33,8 +38,75 @@ export function ObsField({ fieldDefinition }: ObsFieldProps) { default: return ( - Patient attribute type has unknown format "{personAttributeType.format}" + Concept has unknown datatype "{concept.datatype.display}" ); } -} \ No newline at end of file +} + +interface TextObsFieldProps { + concept: ConceptResponse; + validationRegex: string; + label: string; +} + +function TextObsField({ concept, validationRegex, label }: TextObsFieldProps) { + const { t } = useTranslation(); + + const validateInput = (value: string) => { + if (!value || !validationRegex || validationRegex === '' || typeof validationRegex !== 'string' || value === '') { + return; + } + const regex = new RegExp(validationRegex); + if (regex.test(value)) { + return; + } else { + return t('invalidInput', 'Invalid Input'); + } + }; + + const fieldName = `obs.${concept.uuid}`; + + return ( +
+ + {({ field, form: { touched, errors }, meta }) => { + return ( + + ); + }} + +
+ ); +} + +interface CodedObsFieldProps { + concept: ConceptResponse; + answerConceptSetUuid: string; + label?: string; +} + +function CodedObsField({ concept, answerConceptSetUuid, label }: CodedObsFieldProps) { + const { data: conceptAnswers, isLoading: isLoadingConceptAnswers } = useConceptAnswers(answerConceptSetUuid); + const fieldName = `obs.${concept.uuid}`; + + return ( +
+ {!isLoadingConceptAnswers && conceptAnswers?.length ? ( + + ) : ( + + )} +
+ ); +} diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx index edf780b73..c9f5bb1d4 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx @@ -19,7 +19,7 @@ export function CodedPersonAttributeField({ const { data: conceptAnswers, isLoading: isLoadingConceptAnswers } = useConceptAnswers(answerConceptSetUuid); return ( -
+
{!isLoadingConceptAnswers && conceptAnswers?.length ? ( + ); + }} + +
+ ); +} + interface CodedObsFieldProps { concept: ConceptResponse; - answerConceptSetUuid: string; + answerConceptSetUuid?: string; label?: string; } function CodedObsField({ concept, answerConceptSetUuid, label }: CodedObsFieldProps) { - const { data: conceptAnswers, isLoading: isLoadingConceptAnswers } = useConceptAnswers(answerConceptSetUuid); + const { data: conceptAnswers, isLoading: isLoadingConceptAnswers } = useConceptAnswers( + answerConceptSetUuid ?? concept.uuid, + ); const fieldName = `obs.${concept.uuid}`; return (
- {!isLoadingConceptAnswers && conceptAnswers?.length ? ( + {!isLoadingConceptAnswers ? ( - ) : ( - - )} + ) : null}
); } diff --git a/packages/esm-patient-registration-app/src/patient-registration/form-manager.ts b/packages/esm-patient-registration-app/src/patient-registration/form-manager.ts index 0b9a2059c..16d204fb0 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/form-manager.ts +++ b/packages/esm-patient-registration-app/src/patient-registration/form-manager.ts @@ -9,6 +9,7 @@ import { PatientIdentifier, PatientRegistration, RelationshipValue, + Encounter, } from './patient-registration-types'; import { addPatientIdentifier, @@ -21,9 +22,11 @@ import { saveRelationship, updateRelationship, updatePatientIdentifier, + saveEncounter, } from './patient-registration.resource'; import isEqual from 'lodash-es/isEqual'; import { RegistrationConfig } from '../config-schema'; +import _ from 'lodash'; export type SavePatientForm = ( isNewPatient: boolean, @@ -31,23 +34,26 @@ export type SavePatientForm = ( patientUuidMap: PatientUuidMapType, initialAddressFieldValues: Record, capturePhotoProps: CapturePhotoProps, - patientPhotoConceptUuid: string, currentLocation: string, initialIdentifierValues: FormValues['identifiers'], + currentUser: Session, + config: RegistrationConfig, + savePatientTransactionManager: SavePatientTransactionManager, abortController?: AbortController, -) => Promise; +) => Promise; export default class FormManager { - static async savePatientFormOffline( - isNewPatient: boolean, - values: FormValues, - patientUuidMap: PatientUuidMapType, - initialAddressFieldValues: Record, - capturePhotoProps: CapturePhotoProps, - patientPhotoConceptUuid: string, - currentLocation: string, - initialIdentifierValues: FormValues['identifiers'], - ): Promise { + static savePatientFormOffline: SavePatientForm = async ( + isNewPatient, + values, + patientUuidMap, + initialAddressFieldValues, + capturePhotoProps, + currentLocation, + initialIdentifierValues, + currentUser, + config, + ) => { const syncItem: PatientRegistration = { fhirPatient: FormManager.mapPatientToFhirPatient( FormManager.getPatientToCreate(values, patientUuidMap, initialAddressFieldValues, []), @@ -58,9 +64,11 @@ export default class FormManager { patientUuidMap, initialAddressFieldValues, capturePhotoProps, - patientPhotoConceptUuid, currentLocation, initialIdentifierValues, + currentUser, + config, + savePatientTransactionManager: new SavePatientTransactionManager(), }, }; @@ -72,20 +80,21 @@ export default class FormManager { }); return null; - } - - static async savePatientFormOnline( - isNewPatient: boolean, - values: FormValues, - patientUuidMap: PatientUuidMapType, - initialAddressFieldValues: Record, - capturePhotoProps: CapturePhotoProps, - currentLocation: string, - initialIdentifierValues: FormValues['identifiers'], - currentUser: Session, - config: RegistrationConfig, - abortController: AbortController, - ): Promise { + }; + + static savePatientFormOnline: SavePatientForm = async ( + isNewPatient, + values, + patientUuidMap, + initialAddressFieldValues, + capturePhotoProps, + currentLocation, + initialIdentifierValues, + currentUser, + config, + savePatientTransactionManager, + abortController, + ) => { const patientIdentifiers: Array = await FormManager.savePatientIdentifiers( isNewPatient, values.patientUuid, @@ -109,10 +118,12 @@ export default class FormManager { const savePatientResponse = await savePatient( abortController, createdPatient, - isNewPatient ? undefined : values.patientUuid, + isNewPatient && !savePatientTransactionManager.patientSaved ? undefined : values.patientUuid, ); if (savePatientResponse.ok) { + savePatientTransactionManager.patientSaved = true; + console.log('got ok savePatientResponse'); await this.saveRelationships(values.relationships, savePatientResponse, abortController); await this.saveObservations( @@ -136,8 +147,9 @@ export default class FormManager { } } + console.log('returning patient UUID'); return savePatientResponse.data.uuid; - } + }; static async saveRelationships( relationships: Array, @@ -171,30 +183,40 @@ export default class FormManager { } static async saveObservations( - obss: Record, + obss: { [conceptUuid: string]: string }, savePatientResponse: FetchResponse, currentLocation: string, currentUser: Session, config: RegistrationConfig, abortController: AbortController, ) { - if (Object.keys(obss).length > 0 && config.registrationObs.encounterTypeUuid) { - const encounterToSave = { - encounterDatetime: new Date(), - patient: savePatientResponse.data.uuid, - encounterType: config.registrationObs.encounterTypeUuid, - location: currentLocation, - encounterProviders: [ - { - provider: currentUser.currentProvider.uuid, - encounterRole: config.registrationObs.encounterProviderRoleUuid, - }, - ], - form: config.registrationObs.registrationFormUuid, - obs: null, // TODO: transform `obss` into here - }; - - // TODO: fill this in + if (obss && Object.keys(obss).length > 0) { + if (!config.registrationObs.encounterTypeUuid) { + console.error( + 'The registration form has been configured to have obs fields, ' + + 'but no registration encounter type has been configured. Obs field values ' + + 'will not be saved.', + ); + } else { + const encounterToSave: Encounter = { + encounterDatetime: new Date(), + patient: savePatientResponse.data.uuid, + encounterType: config.registrationObs.encounterTypeUuid, + location: currentLocation, + encounterProviders: [ + { + provider: currentUser.currentProvider.uuid, + encounterRole: config.registrationObs.encounterProviderRoleUuid, + }, + ], + form: config.registrationObs.registrationFormUuid, + obs: Object.keys(obss).map((conceptUuid) => ({ + concept: conceptUuid, + value: obss[conceptUuid], + })), + }; + return saveEncounter(abortController, encounterToSave); + } } } @@ -420,3 +442,7 @@ export default class FormManager { }; } } + +export class SavePatientTransactionManager { + patientSaved = false; +} diff --git a/packages/esm-patient-registration-app/src/patient-registration/patient-registration-types.tsx b/packages/esm-patient-registration-app/src/patient-registration/patient-registration-types.tsx index e61ca80bb..05b0c55ad 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/patient-registration-types.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/patient-registration-types.tsx @@ -1,3 +1,7 @@ +import { Session } from '@openmrs/esm-framework'; +import { RegistrationConfig } from '../config-schema'; +import { SavePatientTransactionManager } from './form-manager'; + interface NameValue { uuid: string; preferred: boolean; @@ -82,9 +86,11 @@ export interface PatientRegistration { patientUuidMap: PatientUuidMapType; initialAddressFieldValues: Record; capturePhotoProps: CapturePhotoProps; - patientPhotoConceptUuid: string; currentLocation: string; initialIdentifierValues: FormValues['identifiers']; + currentUser: Session; + config: RegistrationConfig; + savePatientTransactionManager: SavePatientTransactionManager; }; } @@ -111,6 +117,22 @@ export type Patient = { }; }; +export interface Encounter { + encounterDatetime: Date; + patient: string; + encounterType: string; + location: string; + encounterProviders: Array<{ + provider: string; + encounterRole: string; + }>; + form: string; + obs: Array<{ + concept: string; + value: string | number; + }>; +} + export interface RelationshipValue { relatedPersonName?: string; relatedPersonUuid: string; diff --git a/packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx index 9d97ce288..f224d9e9e 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/patient-registration.component.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useContext, useMemo } from 'react'; +import React, { useState, useEffect, useContext, useMemo, useRef } from 'react'; import XAxis16 from '@carbon/icons-react/es/x-axis/16'; import { Button, Link } from 'carbon-components-react'; import BeforeSavePrompt from './before-save-prompt'; @@ -17,7 +17,7 @@ import { useTranslation } from 'react-i18next'; import { validationSchema as initialSchema } from './validation/patient-registration-validation'; import { FormValues, CapturePhotoProps } from './patient-registration-types'; import { PatientRegistrationContext } from './patient-registration-context'; -import { SavePatientForm } from './form-manager'; +import { SavePatientForm, SavePatientTransactionManager } from './form-manager'; import { usePatientPhoto } from './patient-registration.resource'; import { DummyDataInput } from './input/dummy-data/dummy-data-input.component'; import { cancelRegistration, parseAddressTemplateXml, scrollIntoView } from './patient-registration-utils'; @@ -51,6 +51,7 @@ export const PatientRegistration: React.FC = ({ savePa const inEditMode = isLoadingPatientToEdit ? undefined : !!(uuidOfPatientToEdit && patientToEdit); const showDummyData = useMemo(() => localStorage.getItem('openmrs:devtools') === 'true' && !inEditMode, [inEditMode]); const { data: photo } = usePatientPhoto(patientToEdit?.id); + const savePatientTransactionManager = useRef(new SavePatientTransactionManager()); useEffect(() => { exportedInitialFormValuesForTesting = initialFormValues; @@ -101,9 +102,11 @@ export const PatientRegistration: React.FC = ({ savePa patientUuidMap, initialAddressFieldValues, capturePhotoProps, - config?.concepts?.patientPhotoUuid, location, initialFormValues['identifiers'], + currentSession, + config, + savePatientTransactionManager.current, abortController, ); diff --git a/packages/esm-patient-registration-app/src/patient-registration/patient-registration.resource.tsx b/packages/esm-patient-registration-app/src/patient-registration/patient-registration.resource.tsx index e8e0f233e..f84f3f286 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/patient-registration.resource.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/patient-registration.resource.tsx @@ -1,6 +1,6 @@ import useSWR from 'swr'; import { openmrsFetch, useConfig } from '@openmrs/esm-framework'; -import { Patient, Relationship, PatientIdentifier } from './patient-registration-types'; +import { Patient, Relationship, PatientIdentifier, Encounter } from './patient-registration-types'; export const uuidIdentifier = '05a29f94-c0ed-11e2-94be-8c13b969e334'; export const uuidTelephoneNumber = '14d4f066-15f5-102d-96e4-000c29c2a5d7'; @@ -30,6 +30,17 @@ export function savePatient(abortController: AbortController, patient: Patient, }); } +export function saveEncounter(abortController: AbortController, encounter: Encounter) { + return openmrsFetch(`/ws/rest/v1/encounter`, { + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + body: encounter, + signal: abortController.signal, + }); +} + export function generateIdentifier(source: string, abortController: AbortController) { return openmrsFetch(`/ws/rest/v1/idgen/identifiersource/${source}/identifier`, { headers: { diff --git a/yarn.lock b/yarn.lock index 16ef0a74c..f7c85dcf0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2775,20 +2775,20 @@ dependencies: "@octokit/openapi-types" "^12.4.0" -"@openmrs/esm-api@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-api/-/esm-api-3.4.1-pre.112.tgz#8c0262cb531c0c764c7aab5f15e7ed1216d8c44e" - integrity sha512-yy5g/iqztqwWSfhZ/lALVcuPGNn9hXNq+DuUBgjWS2o2jWzYZtufzOsh5sXZtU4G+hUJbvIrdUJ9D5bxd2z91w== +"@openmrs/esm-api@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-api/-/esm-api-3.4.1-pre.122.tgz#a1962a9f21f022b68bc86d5a2ef6d1787afae1ff" + integrity sha512-B2QaonoHrKzsHKtAZPP0X7TeGB3ciOLg1FknJ1xowYgYBD/JUSTLPkXlhzHWrcN49Fg5B1d+R+MZf7N9715hYw== dependencies: fhir.js "0.0.22" lodash-es "^4.17.21" -"@openmrs/esm-app-shell@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-app-shell/-/esm-app-shell-3.4.1-pre.112.tgz#33916f8ae70520574d32a10e6b7c483ab5c00e24" - integrity sha512-1Ps6u9fTGqOKFAYTdpXYo2ht2qGZpIPQ9Nuje+5Gga7YGSEsKTnPowurbLPphl6xTBqBiqIrw3ahQQcn1lYYDA== +"@openmrs/esm-app-shell@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-app-shell/-/esm-app-shell-3.4.1-pre.122.tgz#19c18034110803611aa266d67d9f277988a3940a" + integrity sha512-Ha8gLfIRwky9fEFglfnQsKSpmsuglh6rBnUaj7FqQxu2XMZM7PTnU6DtKZ5xn23sQ3FOTVwetpztmgGV7bsu8g== dependencies: - "@openmrs/esm-framework" "^3.4.1-pre.112" + "@openmrs/esm-framework" "^3.4.1-pre.122" carbon-components "10.31.0" carbon-icons "7.0.7" dayjs "^1.10.4" @@ -2811,101 +2811,101 @@ workbox-strategies "^6.1.5" workbox-window "^6.1.5" -"@openmrs/esm-breadcrumbs@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-breadcrumbs/-/esm-breadcrumbs-3.4.1-pre.112.tgz#c2548819e3a015c92b6eeadf3fd04ec9b28bd53c" - integrity sha512-gHOeVw1sV3zMEl5xcXxBIbB9eVaDN9D9dmDzWi1FS5Wsozboz3fiB9EbnViPR68CHIjyT9QkFPVfqoX/RD5Ayg== +"@openmrs/esm-breadcrumbs@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-breadcrumbs/-/esm-breadcrumbs-3.4.1-pre.122.tgz#6e687da637edd96849646cfd4a25106eadce2d61" + integrity sha512-DdrdyfmCEpbliAvcx6GLY/ro1yW/EcUJnK7zBU2acoPuceWXGOBYQ90nImero2HP7rzdZkaUL7iUSnKsewb2HQ== dependencies: path-to-regexp "6.1.0" -"@openmrs/esm-config@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-config/-/esm-config-3.4.1-pre.112.tgz#7df91d005ba0da8309901892b640e6173524a45c" - integrity sha512-yBeJRkRkCQU8X0GZ+52fdiNv47xmD8v2pXtLOPOrgvCkJI9NBoRNM+4qz/WLXLCRb+hDEKp5v0ESD71royp9jg== +"@openmrs/esm-config@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-config/-/esm-config-3.4.1-pre.122.tgz#f84be61547b89bed38b000ddb4e2641ae9c17c23" + integrity sha512-hsQubQ/diok2PRORgifSh3yR1O89rz4gMjoSa8tAv/c/OnmsvReIV3DHrRdOCjBoI3PFQd0xURkJeRvymE3vYA== dependencies: ramda "^0.26.1" -"@openmrs/esm-error-handling@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-error-handling/-/esm-error-handling-3.4.1-pre.112.tgz#6ccd127c5e9603d91208fc39bb07a40f14988be5" - integrity sha512-gLU+Asl2TxDgcaWem0xBCHPGQatulOi6piZW0wPVkAXRAYfQNI2n9VJmN0oupYU9u2jyeJbtR/tESBruNYKd1w== +"@openmrs/esm-error-handling@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-error-handling/-/esm-error-handling-3.4.1-pre.122.tgz#33c1fe271e1d786625d3f9b9768a405f5527e3b5" + integrity sha512-ClsUX1+4DzdOsWvUmupxSmY/nL7UprY0gui8oO/O1CYmqLDuGpmHs0H+S0aW364wHcnvXU1CsmHd2wY3dkv8pw== -"@openmrs/esm-extensions@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-extensions/-/esm-extensions-3.4.1-pre.112.tgz#4018511353fb4c63e9dc3bcefc6a4bb047dec183" - integrity sha512-cpBTWLkyeykCuQvVDvVdxUgoYMJjJZXbzUA0y6s6NHMOvS7k0jRqlfXvjR/tLV4RZvb5rKkHX3ewrUq3FS5YGA== +"@openmrs/esm-extensions@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-extensions/-/esm-extensions-3.4.1-pre.122.tgz#cd80da2705b1b53820d54c5d5f249b9911b19d1a" + integrity sha512-C0nAhXKNlYfDxkkIWOyvf1Q6HvizmbRqutb9dLamTP6k0WqmzeXzHjCljLm1yS+LWTpWIy0jiOb38BYdFd+gVg== dependencies: lodash-es "^4.17.21" -"@openmrs/esm-framework@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-framework/-/esm-framework-3.4.1-pre.112.tgz#b5714739b7b4f27c0a53cd8d0fd5bdedc19747c6" - integrity sha512-RVKTLder40uEHNsWULKzTKJEnbyqkVhHgl/oIqTBbrMeF3tGgepbEi1bXN1/fhB+4jmdChoLVdPXbuPRiOVIBg== - dependencies: - "@openmrs/esm-api" "^3.4.1-pre.112" - "@openmrs/esm-breadcrumbs" "^3.4.1-pre.112" - "@openmrs/esm-config" "^3.4.1-pre.112" - "@openmrs/esm-error-handling" "^3.4.1-pre.112" - "@openmrs/esm-extensions" "^3.4.1-pre.112" - "@openmrs/esm-globals" "^3.4.1-pre.112" - "@openmrs/esm-offline" "^3.4.1-pre.112" - "@openmrs/esm-react-utils" "^3.4.1-pre.112" - "@openmrs/esm-state" "^3.4.1-pre.112" - "@openmrs/esm-styleguide" "^3.4.1-pre.112" - "@openmrs/esm-utils" "^3.4.1-pre.112" +"@openmrs/esm-framework@^3.4.1-pre.122", "@openmrs/esm-framework@next": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-framework/-/esm-framework-3.4.1-pre.122.tgz#3f500c13bbe74ca6e039d5fb869f6ed93201b479" + integrity sha512-684Z13QwXlw/5DE1WsTddSGOdU2wlczCDwTCnV1Z7J+GPLXcsiD/kM0QWZseIq/ViHr+Ua5B7H5pJzqp+sgYFQ== + dependencies: + "@openmrs/esm-api" "^3.4.1-pre.122" + "@openmrs/esm-breadcrumbs" "^3.4.1-pre.122" + "@openmrs/esm-config" "^3.4.1-pre.122" + "@openmrs/esm-error-handling" "^3.4.1-pre.122" + "@openmrs/esm-extensions" "^3.4.1-pre.122" + "@openmrs/esm-globals" "^3.4.1-pre.122" + "@openmrs/esm-offline" "^3.4.1-pre.122" + "@openmrs/esm-react-utils" "^3.4.1-pre.122" + "@openmrs/esm-state" "^3.4.1-pre.122" + "@openmrs/esm-styleguide" "^3.4.1-pre.122" + "@openmrs/esm-utils" "^3.4.1-pre.122" dayjs "^1.10.7" -"@openmrs/esm-globals@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-globals/-/esm-globals-3.4.1-pre.112.tgz#22fe85a8507d18e8146cf5a11dcfb5b1133ca5ff" - integrity sha512-VDdfxeQKKYycPxSMTG5aQw7VH0imq8tCPVRUJM4zfjm+phk+1Wpa0g9dEvQJnMEbR2fUYAcdJgMb395JIXjjxg== +"@openmrs/esm-globals@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-globals/-/esm-globals-3.4.1-pre.122.tgz#6a717ccfd51686367ce26fe4de17228871992a73" + integrity sha512-BkOGeDpPX00xr6lfwkbKUcXUd1zG4KmJRlh9eqpWDv2cbXw9GLKR4XxrCk0x5dpesEbvpjNiIFQQ6nIVKDD2/Q== -"@openmrs/esm-offline@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-offline/-/esm-offline-3.4.1-pre.112.tgz#9b8363e101f75e0e75857c1d86c7a50dd36e3f1d" - integrity sha512-1lDVf35Drf4V8YnkfwEoNFaQK/HlMyx5SDsdqsWuRzWxfy/q6mW9aQY6DE9dc2UDRbRewGGfge+66NwaD7ZH9Q== +"@openmrs/esm-offline@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-offline/-/esm-offline-3.4.1-pre.122.tgz#5510a43845696a6dc94847e3b0bd4f4ac8546bbd" + integrity sha512-MuCsAqSZtOBUnSYtwmiry/eCB7Rb+jwSz95LOrNh03foB+XSApmxpt0cZNANBOSee6sFQ8SYRt8qPuKGFxSRHQ== dependencies: dexie "^3.0.3" lodash-es "4.17.21" uuid "^8.3.2" workbox-window "^6.1.5" -"@openmrs/esm-react-utils@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-react-utils/-/esm-react-utils-3.4.1-pre.112.tgz#68fe6d466bb357a9fe3d8850c7f545e4e152e4f8" - integrity sha512-nh8caMtUBO4j9kNrDwJuoPFl12yrmaov6xzYPpVXyyMa9swDG8Q5VgbdrLWcojtnfr66FplRAF0W/TseWR2cMg== +"@openmrs/esm-react-utils@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-react-utils/-/esm-react-utils-3.4.1-pre.122.tgz#7c0794b5eefe1fe58da2bb5fdfe32cc000aa0d8a" + integrity sha512-eTTrtL7q2jB9qBVTzAA9JIFIFLX78iYPsWy6M1cmv8Ii7x7FZCAEq6gp3CLSSrq/rdDuiSjY/92aX3HmzoscVw== dependencies: lodash-es "^4.17.21" single-spa-react "^4.1.1" swr "^1.2.2" -"@openmrs/esm-state@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-state/-/esm-state-3.4.1-pre.112.tgz#fdcf52140a0b5615052e00f134092c04bac77fc5" - integrity sha512-4U1yi7XdgZPvAPtafAd8w5o7FRw3m+MawQcbczCDh8otmdf/fFiAspke8ktB5t5x3GwsMB8kuHKIybENAnm9hw== +"@openmrs/esm-state@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-state/-/esm-state-3.4.1-pre.122.tgz#950e7129a25ab499968e0da626a3dbaa7e3b2084" + integrity sha512-/aajHWpFf7BU1zrw/ex8Gx/CqhTIdSJgrHuN8tWD9ILrY5EN9kbZerpjRBswO6jVw1/44rxaJm3dAt4MhpLJiA== dependencies: unistore "^3.5.2" -"@openmrs/esm-styleguide@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-styleguide/-/esm-styleguide-3.4.1-pre.112.tgz#2827ae6c0ae0ed9a3f62f9d02adcb81f42536938" - integrity sha512-RrKK0t9H5HHr4yjJ7nq8jEpH4MgXTfrXkpSd7KQFtnmP4bZcuk866KVhXTodFC3504icp7KPFGv4zeD+vNUfMg== +"@openmrs/esm-styleguide@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-styleguide/-/esm-styleguide-3.4.1-pre.122.tgz#c6ce1ceb1900ac252402a0a947f9254f00beeecf" + integrity sha512-xMB0fm2zuRFWm8we8H/6JlTX5uLtInSBXoatzUZtWGqMWugMLGX2E9AoHSfCeQ2IULRD0+RSztioQ4gUfOkLog== dependencies: "@carbon/charts" "^0.41.57" carbon-components-react "7.31.0" lodash-es "^4.17.21" -"@openmrs/esm-utils@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/esm-utils/-/esm-utils-3.4.1-pre.112.tgz#9317d3a6c070daeab1dd1fe5277980459d4b048f" - integrity sha512-7bN6IEFgdn4D4WJQdvYu3HhMQwauRv5y7C3tCODMF3K0ySUjowGG36lLg3w7Uzi+CandSu3wwtyuJAtBApnzkQ== +"@openmrs/esm-utils@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/esm-utils/-/esm-utils-3.4.1-pre.122.tgz#050c16831f0658eb54215527cb0e92050f535fe1" + integrity sha512-HdsMn2MPq7DI5fF6SkY5bY7pwZpfB/6MMOQlFE+HQgxopkjZMZGv+uQgrS62xFrxtJN2XEcFh20BSgLiM5MxTg== dependencies: semver "^7.3.2" -"@openmrs/webpack-config@^3.4.1-pre.112": - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/@openmrs/webpack-config/-/webpack-config-3.4.1-pre.112.tgz#d7c7d01faa82a59a00ff5d8ad8b7d6cc0dc26b40" - integrity sha512-o6uigD/1SMQQU8cWYy0sTasUmeH2v0gLPGEvlygLue3lhwAjXXAGk01fsGmEOECH6ux5YffIp0o40JdRfxJv7g== +"@openmrs/webpack-config@^3.4.1-pre.122": + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/@openmrs/webpack-config/-/webpack-config-3.4.1-pre.122.tgz#1783a67a1e8bb937acb5709b15b8c1c9617ac535" + integrity sha512-dwqbgjCEmFZA6cVk1w716QxqQAqLFDDH7xBqWDWTnEsuK+ItJTgY/TJciJZeB9bfBdfIHmUUwsIRi/GPg70/mg== dependencies: "@babel/core" "^7.17.9" "@babel/types" "^7.17.0" @@ -11163,14 +11163,14 @@ opener@^1.5.2: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -openmrs@^3.4.1-pre.112: - version "3.4.1-pre.112" - resolved "https://registry.yarnpkg.com/openmrs/-/openmrs-3.4.1-pre.112.tgz#e36fabaed3ab0adf8a8acb67eecc945419c6d806" - integrity sha512-CEidWSrC/j1EnQMus0Z6vj3mYkhcl6N1EQ+fYHgXJpF0yw2BUQ4+8cltroLN9UiNAmbkl/a3UIR44XZlMReDIA== +openmrs@next: + version "3.4.1-pre.122" + resolved "https://registry.yarnpkg.com/openmrs/-/openmrs-3.4.1-pre.122.tgz#7a0d83a5af4b3fdecd1a9a5d57659f150d0d75f8" + integrity sha512-DKayD1WvzBFF6GwYTeyJP3PJnnWqKEJLcww8kla1hPwx/jr8af7RhYOeEYEO/ryabKNGNeaQVuE2KosOgjvP+A== dependencies: "@babel/preset-typescript" "^7.16.7" - "@openmrs/esm-app-shell" "^3.4.1-pre.112" - "@openmrs/webpack-config" "^3.4.1-pre.112" + "@openmrs/esm-app-shell" "^3.4.1-pre.122" + "@openmrs/webpack-config" "^3.4.1-pre.122" "@types/react" "^16.9.46" "@types/systemjs" "^6.1.0" autoprefixer "^10.4.2" From c44190e50b55896e347d24584638d49ee0fa6646 Mon Sep 17 00:00:00 2001 From: Brandon Istenes Date: Wed, 13 Jul 2022 15:14:53 -0700 Subject: [PATCH 4/6] Write tests; fix coded obs so that it actually works --- .../appointment-details.component.tsx | 8 +- .../src/config-schema.ts | 12 +- .../field/__mocks__/field.resource.ts | 60 ++++ .../field/obs/obs-field.component.tsx | 24 +- .../field/obs/obs-field.test.tsx | 103 +++++++ .../src/patient-registration/form-manager.ts | 2 - .../patient-registration.test.tsx | 259 ++++++++++++++---- 7 files changed, 398 insertions(+), 70 deletions(-) create mode 100644 packages/esm-patient-registration-app/src/patient-registration/field/__mocks__/field.resource.ts create mode 100644 packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.test.tsx diff --git a/packages/esm-outpatient-app/src/patient-info/appointment-details.component.tsx b/packages/esm-outpatient-app/src/patient-info/appointment-details.component.tsx index 45c501ea0..9c6b1ae24 100644 --- a/packages/esm-outpatient-app/src/patient-info/appointment-details.component.tsx +++ b/packages/esm-outpatient-app/src/patient-info/appointment-details.component.tsx @@ -26,13 +26,13 @@ const PastAppointmentDetails: React.FC = ({ pastApp {pastAppointments.length >= 1 ? ( pastAppointments.map((appointment, index) => { return ( - <> +

{t('lastEncounter', 'Last encounter')}

{formatDatetime(parseDate(appointment.startDateTime))} · {appointment.service.name} ·{' '} {appointment.location.name}{' '}

- +
); }) ) : ( @@ -52,13 +52,13 @@ const UpcomingAppointmentDetails: React.FC = ({ {upcomingAppointments.length >= 1 ? ( upcomingAppointments.map((appointment, index) => { return ( - <> +

{t('returnDate', 'Return date')}

{formatDatetime(parseDate(appointment.startDateTime))} · {appointment.service.name} ·{' '} {appointment.location.name}{' '}

- +
); }) ) : ( diff --git a/packages/esm-patient-registration-app/src/config-schema.ts b/packages/esm-patient-registration-app/src/config-schema.ts index 0d496601e..d336fc9ca 100644 --- a/packages/esm-patient-registration-app/src/config-schema.ts +++ b/packages/esm-patient-registration-app/src/config-schema.ts @@ -1,4 +1,4 @@ -import { Type, validator, validators } from '@openmrs/esm-framework'; +import { Type, validators } from '@openmrs/esm-framework'; export interface SectionDefinition { id: string; @@ -9,14 +9,14 @@ export interface SectionDefinition { export interface FieldDefinition { id: string; type: string; - label: string; + label: string | null; uuid: string; placeholder: string; validation: { required: boolean; - matches: string; + matches: string | null; }; - answerConceptSetUuid: string; + answerConceptSetUuid: string | null; } export interface RegistrationConfig { @@ -104,9 +104,7 @@ export const esmPatientRegistrationSchema = { type: { _type: Type.String, _description: "How this field's data will be stored—a person attribute or an obs.", - _validators: [ - validator((val) => ['person attribute', 'obs'].includes(val), "Must be one of 'person attribute' or 'obs'."), - ], + _validators: [validators.oneOf(['person attribute', 'obs'])], }, uuid: { _type: Type.UUID, diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/__mocks__/field.resource.ts b/packages/esm-patient-registration-app/src/patient-registration/field/__mocks__/field.resource.ts new file mode 100644 index 000000000..c4f12827f --- /dev/null +++ b/packages/esm-patient-registration-app/src/patient-registration/field/__mocks__/field.resource.ts @@ -0,0 +1,60 @@ +import { ConceptResponse } from '../../patient-registration-types'; + +export const useConcept = jest.fn(function mockUseConceptImplementation(uuid: string): { + data: ConceptResponse; + isLoading: boolean; +} { + let data; + if (uuid == 'weight-uuid') { + data = { + uuid: 'weight-uuid', + display: 'Weight (kg)', + datatype: { display: 'Numeric', uuid: 'num' }, + answers: [], + setMembers: [], + }; + } else if (uuid == 'chief-complaint-uuid') { + data = { + uuid: 'chief-complaint-uuid', + display: 'Chief Complaint', + datatype: { display: 'Text', uuid: 'txt' }, + answers: [], + setMembers: [], + }; + } else if (uuid == 'nationality-uuid') { + data = { + uuid: 'nationality-uuid', + display: 'Nationality', + datatype: { display: 'Coded', uuid: 'cdd' }, + answers: [ + { display: 'USA', uuid: 'usa' }, + { display: 'Mexico', uuid: 'mex' }, + ], + setMembers: [], + }; + } + return { + data: data ?? null, + isLoading: !data, + }; +}); + +export const useConceptAnswers = jest.fn((uuid: string) => { + if (uuid == 'nationality-uuid') { + return { + data: [ + { display: 'USA', uuid: 'usa' }, + { display: 'Mexico', uuid: 'mex' }, + ], + isLoading: false, + }; + } else if (uuid == 'other-countries-uuid') { + return { + data: [ + { display: 'Kenya', uuid: 'ke' }, + { display: 'Uganda', uuid: 'ug' }, + ], + isLoading: false, + }; + } +}); diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx index 606a309b2..a6f7b2297 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx @@ -144,12 +144,24 @@ function CodedObsField({ concept, answerConceptSetUuid, label }: CodedObsFieldPr return (
{!isLoadingConceptAnswers ? ( - + + {({ field, form: { touched, errors }, meta }) => { + return ( + + ); + }} + ) : null}
); diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.test.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.test.tsx new file mode 100644 index 000000000..c0e758754 --- /dev/null +++ b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.test.tsx @@ -0,0 +1,103 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import { FieldDefinition, RegistrationConfig } from '../../../config-schema'; +import { ObsField } from './obs-field.component'; +import { useConfig } from '@openmrs/esm-framework'; +import { useConcept, useConceptAnswers } from '../field.resource'; +import userEvent from '@testing-library/user-event'; + +const mockUseConfig = useConfig as jest.Mock; + +// The UUIDs in this test all refer to ones that are in `__mocks__/field.resource.ts` +jest.mock('../field.resource'); + +type FieldProps = { + children: ({ field, form: { touched, errors } }) => React.ReactNode; +}; +jest.mock('formik', () => ({ + ...(jest.requireActual('formik') as object), + Field: jest.fn(({ children }: FieldProps) => <>{children({ field: {}, form: { touched: {}, errors: {} } })}), + useField: jest.fn(() => [{ value: null }, {}]), +})); + +const textFieldDef: FieldDefinition = { + id: 'chief-complaint', + type: 'obs', + label: '', + placeholder: '', + uuid: 'chief-complaint-uuid', + validation: { + required: false, + matches: null, + }, + answerConceptSetUuid: null, +}; + +const numberFieldDef: FieldDefinition = { + id: 'weight', + type: 'obs', + label: '', + placeholder: '', + uuid: 'weight-uuid', + validation: { + required: false, + matches: null, + }, + answerConceptSetUuid: null, +}; + +const codedFieldDef: FieldDefinition = { + id: 'nationality', + type: 'obs', + label: '', + placeholder: '', + uuid: 'nationality-uuid', + validation: { + required: false, + matches: null, + }, + answerConceptSetUuid: null, +}; + +describe('ObsField', () => { + beforeEach(() => { + mockUseConfig.mockReturnValue({ registrationObs: { encounterTypeUuid: 'reg-enc-uuid' } }); + }); + + it("logs an error and doesn't render if no registration encounter type is provided", () => { + mockUseConfig.mockReturnValue({ registrationObs: { encounterTypeUuid: null } }); + console.error = jest.fn(); + render(); + expect(console.error).toHaveBeenCalledWith(expect.stringMatching(/no registration encounter type.*configure/i)); + expect(screen.queryByRole('textbox')).toBeNull(); + }); + + it('renders a text box for text concept', () => { + render(); + // I don't know why the labels aren't in the DOM, but they aren't + // expect(screen.getByLabelText("Chief Complaint")).toBeInTheDocument(); + expect(screen.getByRole('textbox')).toBeInTheDocument(); + }); + + it('renders a number box for number concept', () => { + render(); + // expect(screen.getByLabelText("Weight (kg)")).toBeInTheDocument(); + expect(screen.getByRole('spinbutton')).toBeInTheDocument(); + }); + + it('renders a select for a coded concept', () => { + render(); + // expect(screen.getByLabelText("Nationality")).toBeInTheDocument(); + const select = screen.getByRole('combobox'); + expect(select).toBeInTheDocument(); + expect(select).toHaveDisplayValue(''); + }); + + it('select uses answerConcept for answers when it is provided', () => { + render(); + // expect(screen.getByLabelText("Nationality")).toBeInTheDocument(); + const select = screen.getByRole('combobox'); + expect(select).toBeInTheDocument(); + userEvent.selectOptions(select, 'Kenya'); + }); +}); diff --git a/packages/esm-patient-registration-app/src/patient-registration/form-manager.ts b/packages/esm-patient-registration-app/src/patient-registration/form-manager.ts index 16d204fb0..93552223e 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/form-manager.ts +++ b/packages/esm-patient-registration-app/src/patient-registration/form-manager.ts @@ -123,7 +123,6 @@ export default class FormManager { if (savePatientResponse.ok) { savePatientTransactionManager.patientSaved = true; - console.log('got ok savePatientResponse'); await this.saveRelationships(values.relationships, savePatientResponse, abortController); await this.saveObservations( @@ -147,7 +146,6 @@ export default class FormManager { } } - console.log('returning patient UUID'); return savePatientResponse.data.uuid; }; diff --git a/packages/esm-patient-registration-app/src/patient-registration/patient-registration.test.tsx b/packages/esm-patient-registration-app/src/patient-registration/patient-registration.test.tsx index 564b1ce4b..a4f02f659 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/patient-registration.test.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/patient-registration.test.tsx @@ -1,19 +1,25 @@ import React from 'react'; -import { render, screen, fireEvent, waitFor } from '@testing-library/react'; +import { render, screen, fireEvent, waitFor, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import * as backendController from './patient-registration.resource'; +import * as patientRegistrationResource from './patient-registration.resource'; import * as mockOpenmrsFramework from '@openmrs/esm-framework/mock'; import { PatientRegistration } from './patient-registration.component'; import { mockPatient } from '../../__mocks__/patient.mock'; import { match } from 'react-router-dom'; import FormManager from './form-manager'; import { Resources, ResourcesContext } from '../offline.resources'; +import { showToast, useConfig } from '@openmrs/esm-framework'; +import { cloneDeep } from 'lodash-es'; +import { RegistrationConfig } from '../config-schema'; +import { useConcept, useConceptAnswers } from './field/field.resource'; +import { ConceptResponse, Encounter } from './patient-registration-types'; jest.mock('react-router-dom', () => ({ ...(jest.requireActual('react-router-dom') as any), useLocation: () => ({ pathname: 'openmrs/spa/patient-registration', }), + useHistory: () => [], })); const predefinedAddressTemplate = { @@ -27,26 +33,43 @@ const predefinedAddressTemplate = { const mockResourcesContextValue = { addressTemplate: predefinedAddressTemplate, - currentSession: { authenticated: true, sessionId: 'JSESSION' }, + currentSession: { + authenticated: true, + sessionId: 'JSESSION', + currentProvider: { uuid: 'provider-uuid', identifier: 'PRO-123' }, + }, relationshipTypes: [], identifierTypes: [], } as Resources; -let mockOpenmrsConfig = { +let mockOpenmrsConfig: RegistrationConfig = { sections: ['demographics', 'contact'], sectionDefinitions: [ { id: 'demographics', name: 'Demographics', fields: ['name', 'gender', 'dob'] }, { id: 'contact', name: 'Contact Info', fields: ['address'] }, { id: 'relationships', name: 'Relationships', fields: ['relationship'] }, ], + fieldDefinitions: [], fieldConfigurations: { name: { displayMiddleName: true, + unidentifiedPatient: true, + defaultUnknownGivenName: 'UNKNOWN', + defaultUnknownFamilyName: 'UNKNOWN', }, }, concepts: { patientPhotoUuid: '736e8771-e501-4615-bfa7-570c03f4bef5', }, + links: { + submitButton: '#', + }, + defaultPatientIdentifierTypes: [], + registrationObs: { + encounterTypeUuid: null, + encounterProviderRoleUuid: 'asdf', + registrationFormUuid: null, + }, }; const path = `/patient/:patientUuid/edit`; @@ -58,15 +81,84 @@ const sampleMatchProp: match<{ patientUuid: string }> = { params: { patientUuid: '1' }, }; -jest.mock('@openmrs/esm-framework', () => { - const originalModule = jest.requireActual('@openmrs/esm-framework'); - return { - ...originalModule, - useConfig: jest.fn().mockImplementation(() => mockOpenmrsConfig), - }; +const mockUseConfig = useConfig as jest.Mock; + +// Mock field.resource using the manual mock (in __mocks__) +jest.mock('./field/field.resource'); + +const configWithObs = cloneDeep(mockOpenmrsConfig); +configWithObs.fieldDefinitions = [ + { + id: 'weight', + type: 'obs', + label: null, + uuid: 'weight-uuid', + placeholder: '', + validation: { required: false, matches: null }, + answerConceptSetUuid: null, + }, + { + id: 'chief complaint', + type: 'obs', + label: null, + uuid: 'chief-complaint-uuid', + placeholder: '', + validation: { required: false, matches: null }, + answerConceptSetUuid: null, + }, + { + id: 'nationality', + type: 'obs', + label: null, + uuid: 'nationality-uuid', + placeholder: '', + validation: { required: false, matches: null }, + answerConceptSetUuid: null, + }, +]; +configWithObs.sectionDefinitions.push({ + id: 'custom', + name: 'Custom', + fields: ['weight', 'chief complaint', 'nationality'], }); +configWithObs.sections.push('custom'); +configWithObs.registrationObs.encounterTypeUuid = 'reg-enc-uuid'; + +jest.mock('./patient-registration.resource', () => ({ + ...(jest.requireActual('./patient-registration.resource') as any), + savePatient: jest.fn(), + saveEncounter: jest.fn(), +})); + +const mockSavePatient = patientRegistrationResource.savePatient as jest.Mock; +const mockSaveEncounter = patientRegistrationResource.saveEncounter as jest.Mock; + +const mockShowToast = showToast as jest.Mock; + +const fillRequiredFields = async () => { + const demographicsSection = await screen.findByLabelText('Demographics Section'); + const givenNameInput = within(demographicsSection).getByLabelText(/first/i) as HTMLInputElement; + const familyNameInput = within(demographicsSection).getByLabelText(/family/i) as HTMLInputElement; + const dateOfBirthInput = within(demographicsSection).getByLabelText(/date of birth/i) as HTMLInputElement; + const genderInput = within(demographicsSection).getByLabelText(/Male/) as HTMLSelectElement; + + userEvent.type(givenNameInput, 'Paul'); + userEvent.type(familyNameInput, 'Gaihre'); + userEvent.clear(dateOfBirthInput); + userEvent.type(dateOfBirthInput, '02/08/1993'); + fireEvent.blur(dateOfBirthInput); + fireEvent.click(genderInput); +}; describe('patient registration', () => { + beforeEach(() => { + mockUseConfig.mockReturnValue(mockOpenmrsConfig); + mockSavePatient.mockClear(); + mockSavePatient.mockReturnValue({ data: { uuid: 'new-pt-uuid' }, ok: true }); + mockSaveEncounter.mockClear(); + mockShowToast.mockClear(); + }); + it('renders without crashing', () => { render( @@ -76,7 +168,6 @@ describe('patient registration', () => { }); it('has the expected sections', async () => { - spyOn(mockOpenmrsFramework, 'useConfig').and.returnValue(mockOpenmrsConfig); render( @@ -85,61 +176,49 @@ describe('patient registration', () => { await waitFor(() => expect(screen.getByLabelText(/Demographics Section/)).not.toBeNull()); expect(screen.getByLabelText(/Contact Info Section/)).not.toBeNull(); }); -}); - -describe('form submit', () => { - const fillRequiredFields = (getByLabelText) => { - const givenNameInput = getByLabelText('givenNameLabelText') as HTMLInputElement; - const familyNameInput = getByLabelText('familyNameLabelText') as HTMLInputElement; - const dateOfBirthInput = getByLabelText('dateOfBirthLabelText') as HTMLInputElement; - const genderInput = getByLabelText('Male') as HTMLSelectElement; - - userEvent.type(givenNameInput, 'Paul'); - userEvent.type(familyNameInput, 'Gaihre'); - userEvent.type(dateOfBirthInput, '1993-08-02'); - fireEvent.click(genderInput); - }; - - beforeAll(() => { - spyOn(mockOpenmrsFramework, 'useConfig').and.returnValue(mockOpenmrsConfig); - }); - - it.skip('saves the patient without extra info', async () => { - spyOn(backendController, 'savePatient').and.returnValue(Promise.resolve({})); - render(); + it('saves the patient without extra info', async () => { + render( + + + , + ); - fillRequiredFields(screen.getByLabelText); + await fillRequiredFields(); userEvent.click(await screen.findByText('Register Patient')); - waitFor(() => { - expect(backendController.savePatient).toHaveBeenCalledWith( + await waitFor(() => { + expect(patientRegistrationResource.savePatient).toHaveBeenCalledWith( expect.anything(), - { + expect.objectContaining({ identifiers: [], //TODO when the identifer story is finished: { identifier: '', identifierType: '05a29f94-c0ed-11e2-94be-8c13b969e334', location: '' } // identifiers: [{ identifier: '', identifierType: '05a29f94-c0ed-11e2-94be-8c13b969e334', location: '' }], person: { - addresses: [ - { address1: '', address2: '', cityVillage: '', country: '', postalCode: '', stateProvince: '' }, - ], + addresses: [{}], attributes: [], - birthdate: '1993-08-02', + birthdate: '1993-8-2', birthdateEstimated: false, gender: 'M', - names: [{ givenName: 'Paul', middleName: '', familyName: 'Gaihre', preferred: true }], + names: [{ givenName: 'Paul', middleName: '', familyName: 'Gaihre', preferred: true, uuid: undefined }], dead: false, + uuid: expect.anything(), }, - }, + uuid: expect.anything(), + }), undefined, ); }); }); it('should not save the patient if validation fails', async () => { - spyOn(backendController, 'savePatient').and.returnValue(Promise.resolve({})); + const mockSavePatientForm = jest.fn(); render( - + , ); @@ -149,11 +228,11 @@ describe('form submit', () => { userEvent.click(screen.getByText('Register Patient')); - expect(backendController.savePatient).not.toHaveBeenCalled(); + expect(mockSavePatientForm).not.toHaveBeenCalled(); }); it.skip('edits patient demographics', async () => { - spyOn(backendController, 'savePatient').and.returnValue(Promise.resolve({})); + spyOn(patientRegistrationResource, 'savePatient').and.returnValue(Promise.resolve({})); spyOn(mockOpenmrsFramework, 'usePatient').and.returnValue({ isLoading: false, patient: mockPatient, @@ -171,9 +250,9 @@ describe('form submit', () => { , ); - const givenNameInput = screen.getByLabelText('Given Name') as HTMLInputElement; - const familyNameInput = screen.getByLabelText('Family Name') as HTMLInputElement; - const middleNameInput = screen.getByLabelText('Middle Name') as HTMLInputElement; + const givenNameInput = screen.getByLabelText(/First Name/) as HTMLInputElement; + const familyNameInput = screen.getByLabelText(/Family Name/) as HTMLInputElement; + const middleNameInput = screen.getByLabelText(/Middle Name/) as HTMLInputElement; const dateOfBirthInput = screen.getByLabelText('Date of Birth') as HTMLInputElement; const address1 = screen.getByLabelText('Location.address1') as HTMLInputElement; @@ -193,7 +272,7 @@ describe('form submit', () => { userEvent.type(address1, 'Bom Jesus Street'); userEvent.click(screen.getByText('Update Patient')); - expect(backendController.savePatient).toHaveBeenCalledWith( + expect(patientRegistrationResource.savePatient).toHaveBeenCalledWith( expect.anything(), { uuid: '8673ee4f-e2ab-4077-ba55-4980f408773e', @@ -242,4 +321,82 @@ describe('form submit', () => { '8673ee4f-e2ab-4077-ba55-4980f408773e', ); }); + + it('renders and saves registration obs', async () => { + mockSaveEncounter.mockResolvedValue({}); + mockUseConfig.mockReturnValue(configWithObs); + + render( + + + , + ); + + await fillRequiredFields(); + const customSection = screen.getByLabelText('Custom Section'); + const weight = within(customSection).getByLabelText('Weight (kg)'); + userEvent.type(weight, '50'); + const complaint = within(customSection).getByLabelText('Chief Complaint'); + userEvent.type(complaint, 'sad'); + const nationality = within(customSection).getByLabelText('Nationality'); + userEvent.selectOptions(nationality, 'USA'); + + userEvent.click(screen.getByText('Register Patient')); + + await waitFor(() => expect(mockSavePatient).toHaveBeenCalled()); + await waitFor(() => + expect(mockSaveEncounter).toHaveBeenCalledWith( + expect.anything(), + expect.objectContaining>({ + encounterType: 'reg-enc-uuid', + patient: 'new-pt-uuid', + obs: [ + { concept: 'weight-uuid', value: 50 }, + { concept: 'chief-complaint-uuid', value: 'sad' }, + { concept: 'nationality-uuid', value: 'usa' }, + ], + }), + ), + ); + }); + + it('retries saving registration obs after a failed attempt', async () => { + mockUseConfig.mockReturnValue(configWithObs); + + render( + + + , + ); + + await fillRequiredFields(); + const customSection = screen.getByLabelText('Custom Section'); + const weight = within(customSection).getByLabelText('Weight (kg)'); + userEvent.type(weight, '-999'); + + mockSaveEncounter.mockRejectedValue({ status: 400, responseBody: { error: { message: 'an error message' } } }); + + userEvent.click(screen.getByText('Register Patient')); + + await waitFor(() => expect(mockSavePatient).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(mockSaveEncounter).toHaveBeenCalledTimes(1)); + await waitFor(() => + expect(mockShowToast).toHaveBeenCalledWith(expect.objectContaining({ description: 'an error message' })), + ); + + mockSaveEncounter.mockResolvedValue({}); + + userEvent.click(screen.getByText('Register Patient')); + await waitFor(() => expect(mockSavePatient).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(mockSaveEncounter).toHaveBeenCalledTimes(2)); + await waitFor(() => expect(mockShowToast).toHaveBeenCalledWith(expect.objectContaining({ kind: 'success' }))); + }); }); From addfbb571845fc6f9dd20618fb79eebf01335460 Mon Sep 17 00:00:00 2001 From: Brandon Istenes Date: Wed, 13 Jul 2022 16:07:17 -0700 Subject: [PATCH 5/6] Add top level config validators --- .../src/config-schema.ts | 61 ++- yarn.lock | 367 +++++++++--------- 2 files changed, 246 insertions(+), 182 deletions(-) diff --git a/packages/esm-patient-registration-app/src/config-schema.ts b/packages/esm-patient-registration-app/src/config-schema.ts index d336fc9ca..8fc459f9f 100644 --- a/packages/esm-patient-registration-app/src/config-schema.ts +++ b/packages/esm-patient-registration-app/src/config-schema.ts @@ -1,4 +1,4 @@ -import { Type, validators } from '@openmrs/esm-framework'; +import { Type, validator, validators } from '@openmrs/esm-framework'; export interface SectionDefinition { id: string; @@ -198,9 +198,58 @@ export const esmPatientRegistrationSchema = { 'The form UUID to associate with the registration encounter. By default no form will be associated.', }, }, - - // TODO: validate that - // - if a field has type 'obs', registrationObs.encounterTypeUuid is not null - // - all sections have been defined - // - all fields have been defined + _validators: [ + validator( + (config: RegistrationConfig) => + !config.fieldDefinitions.some((d) => d.type == 'obs') || config.registrationObs.encounterTypeUuid != null, + "If fieldDefinitions contains any fields of type 'obs', `registrationObs.encounterTypeUuid` must be specified.", + ), + validator( + (config: RegistrationConfig) => + config.sections.every((s) => + [...builtInSections, ...config.sectionDefinitions].map((sDef) => sDef.id).includes(s), + ), + (config: RegistrationConfig) => { + const allowedSections = [...builtInSections, ...config.sectionDefinitions].map((sDef) => sDef.id); + const badSection = config.sections.find((s) => !allowedSections.includes(s)); + return ( + `'${badSection}' is not a valid section ID. Valid section IDs include the built-in sections ${stringifyDefinitions( + builtInSections, + )}` + + (config.sectionDefinitions.length + ? `; and the defined sections ${stringifyDefinitions(config.sectionDefinitions)}.` + : '.') + ); + }, + ), + validator( + (config: RegistrationConfig) => + config.sectionDefinitions.every((sectionDefinition) => + sectionDefinition.fields.every((f) => + [...builtInFields, ...config.fieldDefinitions.map((fDef) => fDef.id)].includes(f), + ), + ), + (config: RegistrationConfig) => { + const allowedFields = [...builtInFields, ...config.fieldDefinitions.map((fDef) => fDef.id)]; + const badSection = config.sectionDefinitions.find((sectionDefinition) => + sectionDefinition.fields.some((f) => !allowedFields.includes(f)), + ); + const badField = badSection.fields.find((f) => !allowedFields.includes(f)); + return ( + `The section definition '${ + badSection.id + }' contains an invalid field '${badField}'. 'fields' can only contain the built-in fields '${builtInFields.join( + "', '", + )}'` + + (config.fieldDefinitions.length + ? `; or the defined fields ${stringifyDefinitions(config.fieldDefinitions)}.` + : '.') + ); + }, + ), + ], }; + +function stringifyDefinitions(sectionDefinitions: Array) { + return `'${sectionDefinitions.map((s) => s.id).join("', '")}'`; +} diff --git a/yarn.lock b/yarn.lock index f7c85dcf0..5ad785ec7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -34,9 +34,9 @@ "@babel/highlight" "^7.18.6" "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.6.tgz#8b37d24e88e8e21c499d4328db80577d8882fa53" - integrity sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" + integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== "@babel/core@^7.1.0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.7.5": version "7.18.5" @@ -80,7 +80,7 @@ json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.18.2", "@babel/generator@^7.18.6": +"@babel/generator@^7.18.2", "@babel/generator@^7.18.6", "@babel/generator@^7.18.7": version "7.18.7" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.7.tgz#2aa78da3c05aadfc82dbac16c99552fc802284bd" integrity sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A== @@ -190,7 +190,7 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.18.0", "@babel/helper-module-transforms@^7.18.6": +"@babel/helper-module-transforms@^7.18.0": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz#57e3ca669e273d55c3cda55e6ebf552f37f483c8" integrity sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw== @@ -204,6 +204,20 @@ "@babel/traverse" "^7.18.6" "@babel/types" "^7.18.6" +"@babel/helper-module-transforms@^7.18.6": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz#4f8408afead0188cfa48672f9d0e5787b61778c8" + integrity sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA== + dependencies: + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.8" + "@babel/types" "^7.18.8" + "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" @@ -310,7 +324,12 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.5.tgz#337062363436a893a2d22faa60be5bb37091c83c" integrity sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw== -"@babel/parser@^7.12.5", "@babel/parser@^7.16.7", "@babel/parser@^7.18.5", "@babel/parser@^7.18.6": +"@babel/parser@^7.12.5", "@babel/parser@^7.18.6", "@babel/parser@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.8.tgz#822146080ac9c62dac0823bb3489622e0bc1cbdf" + integrity sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA== + +"@babel/parser@^7.16.7", "@babel/parser@^7.18.5": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.6.tgz#845338edecad65ebffef058d3be851f1d28a63bc" integrity sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw== @@ -617,9 +636,9 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-classes@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz#3501a8f3f4c7d5697c27a3eedbee71d68312669f" - integrity sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.8.tgz#7e85777e622e979c85c701a095280360b818ce49" + integrity sha512-RySDoXdF6hgHSHuAW4aLGyVQdmvEX/iJtjVre52k0pxRq4hzqze+rAVP++NmNv596brBpYmaiKgTZby7ziBnVg== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-environment-visitor" "^7.18.6" @@ -668,9 +687,9 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-for-of@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz#e0fdb813be908e91ccc9ec87b30cc2eabf046f7c" - integrity sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" + integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -759,9 +778,9 @@ "@babel/helper-replace-supers" "^7.18.6" "@babel/plugin-transform-parameters@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz#cbe03d5a4c6385dd756034ac1baa63c04beab8dc" - integrity sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz#ee9f1a0ce6d78af58d0956a9378ea3427cccb48a" + integrity sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg== dependencies: "@babel/helper-plugin-utils" "^7.18.6" @@ -824,9 +843,9 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-typescript@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.6.tgz#8f4ade1a9cf253e5cf7c7c20173082c2c08a50a7" - integrity sha512-ijHNhzIrLj5lQCnI6aaNVRtGVuUZhOXFLRVFs7lLrkXTHip4FKty5oAuQdk4tywG0/WjXmjTfQCWmuzrvFer1w== + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.8.tgz#303feb7a920e650f2213ef37b36bbf327e6fa5a0" + integrity sha512-p2xM8HI83UObjsZGofMV/EdYjamsDm6MoN3hXPYIT0+gxIoopE+B7rPYKAxfrz9K9PK7JafTTjqYC6qipLExYA== dependencies: "@babel/helper-create-class-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" @@ -1004,7 +1023,23 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.12.5", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.5", "@babel/traverse@^7.18.6": +"@babel/traverse@^7.12.5", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.8.tgz#f095e62ab46abf1da35e5a2011f43aee72d8d5b0" + integrity sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.7" + "@babel/helper-environment-visitor" "^7.18.6" + "@babel/helper-function-name" "^7.18.6" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.18.8" + "@babel/types" "^7.18.8" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/traverse@^7.18.5": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.6.tgz#a228562d2f46e89258efa4ddd0416942e2fd671d" integrity sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw== @@ -1028,7 +1063,7 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.18.4", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.4.4": +"@babel/types@^7.16.7", "@babel/types@^7.18.4": version "7.18.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.7.tgz#a4a2c910c15040ea52cdd1ddb1614a65c8041726" integrity sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ== @@ -1036,6 +1071,14 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@babel/types@^7.17.0", "@babel/types@^7.18.6", "@babel/types@^7.18.7", "@babel/types@^7.18.8", "@babel/types@^7.4.4": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.8.tgz#c5af199951bf41ba4a6a9a6d0d8ad722b30cd42f" + integrity sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1785,9 +1828,9 @@ "@jridgewell/trace-mapping" "^0.3.9" "@jridgewell/resolve-uri@^3.0.3": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.8.tgz#687cc2bbf243f4e9a868ecf2262318e2658873a1" - integrity sha512-YK5G9LaddzGbcucK4c8h5tWFmMPBvRZ/uyWmN1/SbBdIvqGUdWGkJ5BAaccgs6XbzVLsqbPJrBSFwKv3kT9i7w== + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== "@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": version "1.1.2" @@ -2775,20 +2818,19 @@ dependencies: "@octokit/openapi-types" "^12.4.0" -"@openmrs/esm-api@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-api/-/esm-api-3.4.1-pre.122.tgz#a1962a9f21f022b68bc86d5a2ef6d1787afae1ff" - integrity sha512-B2QaonoHrKzsHKtAZPP0X7TeGB3ciOLg1FknJ1xowYgYBD/JUSTLPkXlhzHWrcN49Fg5B1d+R+MZf7N9715hYw== +"@openmrs/esm-api@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-api/-/esm-api-3.4.1-pre.133.tgz#9b3b2299d1717167d96ab02a474aa269254e3093" + integrity sha512-+puhWWRh7dBT3c/h2ikYowubejedyhxK7xbnuoCfaTESleRyBe5qChQHbIcInx66r0iMAoaC8vNohfdemJB+lA== dependencies: - fhir.js "0.0.22" lodash-es "^4.17.21" -"@openmrs/esm-app-shell@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-app-shell/-/esm-app-shell-3.4.1-pre.122.tgz#19c18034110803611aa266d67d9f277988a3940a" - integrity sha512-Ha8gLfIRwky9fEFglfnQsKSpmsuglh6rBnUaj7FqQxu2XMZM7PTnU6DtKZ5xn23sQ3FOTVwetpztmgGV7bsu8g== +"@openmrs/esm-app-shell@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-app-shell/-/esm-app-shell-3.4.1-pre.133.tgz#4256dd754be6314914c46fdbeebfdd9bd574c495" + integrity sha512-AX/uUBxePykr00DzAgu0Qcw2u5rLibu0Vu7lZOHx41wxU4L16NzC9sc1O9x6QQ7OPHejUrhh5oj3yoA1Ajwsaw== dependencies: - "@openmrs/esm-framework" "^3.4.1-pre.122" + "@openmrs/esm-framework" "^3.4.1-pre.133" carbon-components "10.31.0" carbon-icons "7.0.7" dayjs "^1.10.4" @@ -2811,101 +2853,101 @@ workbox-strategies "^6.1.5" workbox-window "^6.1.5" -"@openmrs/esm-breadcrumbs@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-breadcrumbs/-/esm-breadcrumbs-3.4.1-pre.122.tgz#6e687da637edd96849646cfd4a25106eadce2d61" - integrity sha512-DdrdyfmCEpbliAvcx6GLY/ro1yW/EcUJnK7zBU2acoPuceWXGOBYQ90nImero2HP7rzdZkaUL7iUSnKsewb2HQ== +"@openmrs/esm-breadcrumbs@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-breadcrumbs/-/esm-breadcrumbs-3.4.1-pre.133.tgz#fd684a37430df09098174ff873fb107ed7ada759" + integrity sha512-v7VZtSwpFE0A9gftxPwPMzQsMoE9SeL0iIHC7vza9dcPzRBR+1tqiA6ir3K8jLq4sH4R5yVwQvNz6olG2PQ3QA== dependencies: path-to-regexp "6.1.0" -"@openmrs/esm-config@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-config/-/esm-config-3.4.1-pre.122.tgz#f84be61547b89bed38b000ddb4e2641ae9c17c23" - integrity sha512-hsQubQ/diok2PRORgifSh3yR1O89rz4gMjoSa8tAv/c/OnmsvReIV3DHrRdOCjBoI3PFQd0xURkJeRvymE3vYA== +"@openmrs/esm-config@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-config/-/esm-config-3.4.1-pre.133.tgz#af04d99f1177c4bf3e6de218614e090f1b3e047e" + integrity sha512-DATM1suaJGViHgFLRvFiMvriYz1nbM+2ofx74oM14a0M3jD/eCowdUqqcOhU02J8YTu3HK+ItL27+hImtgEdrQ== dependencies: ramda "^0.26.1" -"@openmrs/esm-error-handling@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-error-handling/-/esm-error-handling-3.4.1-pre.122.tgz#33c1fe271e1d786625d3f9b9768a405f5527e3b5" - integrity sha512-ClsUX1+4DzdOsWvUmupxSmY/nL7UprY0gui8oO/O1CYmqLDuGpmHs0H+S0aW364wHcnvXU1CsmHd2wY3dkv8pw== +"@openmrs/esm-error-handling@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-error-handling/-/esm-error-handling-3.4.1-pre.133.tgz#eb73ad456a306bb733f73b75995386233ebe4ae7" + integrity sha512-bz+TgZnUQa5Vzv7tp0Oi4LAr/A7ZihLy4rk0nCgu+IbVDrXFh1fPYhzniML2Qy9CqNcWFhQt+YI4iJOD7OoSkg== -"@openmrs/esm-extensions@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-extensions/-/esm-extensions-3.4.1-pre.122.tgz#cd80da2705b1b53820d54c5d5f249b9911b19d1a" - integrity sha512-C0nAhXKNlYfDxkkIWOyvf1Q6HvizmbRqutb9dLamTP6k0WqmzeXzHjCljLm1yS+LWTpWIy0jiOb38BYdFd+gVg== +"@openmrs/esm-extensions@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-extensions/-/esm-extensions-3.4.1-pre.133.tgz#bca2031c939d8f1514580f0a743f919ad08cea66" + integrity sha512-I5qCjw/O4clY6+Jlnm4r+pXq+mzPC68fHA2jYaN1Tm18ulkdFKx0YM6/McHIwxj6CNl6wZNyzpD7wtkV9AFs2Q== dependencies: lodash-es "^4.17.21" -"@openmrs/esm-framework@^3.4.1-pre.122", "@openmrs/esm-framework@next": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-framework/-/esm-framework-3.4.1-pre.122.tgz#3f500c13bbe74ca6e039d5fb869f6ed93201b479" - integrity sha512-684Z13QwXlw/5DE1WsTddSGOdU2wlczCDwTCnV1Z7J+GPLXcsiD/kM0QWZseIq/ViHr+Ua5B7H5pJzqp+sgYFQ== - dependencies: - "@openmrs/esm-api" "^3.4.1-pre.122" - "@openmrs/esm-breadcrumbs" "^3.4.1-pre.122" - "@openmrs/esm-config" "^3.4.1-pre.122" - "@openmrs/esm-error-handling" "^3.4.1-pre.122" - "@openmrs/esm-extensions" "^3.4.1-pre.122" - "@openmrs/esm-globals" "^3.4.1-pre.122" - "@openmrs/esm-offline" "^3.4.1-pre.122" - "@openmrs/esm-react-utils" "^3.4.1-pre.122" - "@openmrs/esm-state" "^3.4.1-pre.122" - "@openmrs/esm-styleguide" "^3.4.1-pre.122" - "@openmrs/esm-utils" "^3.4.1-pre.122" +"@openmrs/esm-framework@^3.4.1-pre.133", "@openmrs/esm-framework@next": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-framework/-/esm-framework-3.4.1-pre.133.tgz#2c4093effe43a022a27812f059721e90c848e747" + integrity sha512-Hc5IbjlkQNMP/m9DurYOhnGMB83Z2L13gvUj/HVihPoq8VijPYEQ9lFDBJjyBP/TY2u3vNkorbb5FWMIat9uQw== + dependencies: + "@openmrs/esm-api" "^3.4.1-pre.133" + "@openmrs/esm-breadcrumbs" "^3.4.1-pre.133" + "@openmrs/esm-config" "^3.4.1-pre.133" + "@openmrs/esm-error-handling" "^3.4.1-pre.133" + "@openmrs/esm-extensions" "^3.4.1-pre.133" + "@openmrs/esm-globals" "^3.4.1-pre.133" + "@openmrs/esm-offline" "^3.4.1-pre.133" + "@openmrs/esm-react-utils" "^3.4.1-pre.133" + "@openmrs/esm-state" "^3.4.1-pre.133" + "@openmrs/esm-styleguide" "^3.4.1-pre.133" + "@openmrs/esm-utils" "^3.4.1-pre.133" dayjs "^1.10.7" -"@openmrs/esm-globals@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-globals/-/esm-globals-3.4.1-pre.122.tgz#6a717ccfd51686367ce26fe4de17228871992a73" - integrity sha512-BkOGeDpPX00xr6lfwkbKUcXUd1zG4KmJRlh9eqpWDv2cbXw9GLKR4XxrCk0x5dpesEbvpjNiIFQQ6nIVKDD2/Q== +"@openmrs/esm-globals@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-globals/-/esm-globals-3.4.1-pre.133.tgz#995a94b9cd2686793ff4f6d11742ea3e52b9a12c" + integrity sha512-J63SEFdPlnIERvvKxFRHCBrgOysVn/24osiqcmihAEA6XK1/TmOTfUcnQkbfUv3tWg2pbLjX3jlfX4l7yrp3yA== -"@openmrs/esm-offline@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-offline/-/esm-offline-3.4.1-pre.122.tgz#5510a43845696a6dc94847e3b0bd4f4ac8546bbd" - integrity sha512-MuCsAqSZtOBUnSYtwmiry/eCB7Rb+jwSz95LOrNh03foB+XSApmxpt0cZNANBOSee6sFQ8SYRt8qPuKGFxSRHQ== +"@openmrs/esm-offline@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-offline/-/esm-offline-3.4.1-pre.133.tgz#6fc930b8568de3795f4914802a7fc5139d3edaab" + integrity sha512-if+LKYzr0d05rQrAcRXW83J3uN6E6WfJc30MyXpoP5k/CdVpopGxQMlolBRPQeJarlZn5sqDwi8l2IkWDosJAw== dependencies: dexie "^3.0.3" lodash-es "4.17.21" uuid "^8.3.2" workbox-window "^6.1.5" -"@openmrs/esm-react-utils@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-react-utils/-/esm-react-utils-3.4.1-pre.122.tgz#7c0794b5eefe1fe58da2bb5fdfe32cc000aa0d8a" - integrity sha512-eTTrtL7q2jB9qBVTzAA9JIFIFLX78iYPsWy6M1cmv8Ii7x7FZCAEq6gp3CLSSrq/rdDuiSjY/92aX3HmzoscVw== +"@openmrs/esm-react-utils@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-react-utils/-/esm-react-utils-3.4.1-pre.133.tgz#76261860776135df9b65ef99cf2008b46940b88f" + integrity sha512-mJHzKrBfsmFm5rvFU0sGWtau5yKv/72SuMvpFhiWqHmlfu6LKyyvcvU/hykVIMGW5dUbEaQVOhdZfskucfwz5g== dependencies: lodash-es "^4.17.21" single-spa-react "^4.1.1" swr "^1.2.2" -"@openmrs/esm-state@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-state/-/esm-state-3.4.1-pre.122.tgz#950e7129a25ab499968e0da626a3dbaa7e3b2084" - integrity sha512-/aajHWpFf7BU1zrw/ex8Gx/CqhTIdSJgrHuN8tWD9ILrY5EN9kbZerpjRBswO6jVw1/44rxaJm3dAt4MhpLJiA== +"@openmrs/esm-state@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-state/-/esm-state-3.4.1-pre.133.tgz#be1fa19ba5dcdc3711cc1d9bb2e1c127ec4ad83d" + integrity sha512-T6+z9QOXC4pEAJyAUiPueEpQlS3cqCSCbpxfpTUoZuZ1dMttvmjn9w3oTx2a1A2UeFcRRI/y3u4U6I6ESfSOFQ== dependencies: unistore "^3.5.2" -"@openmrs/esm-styleguide@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-styleguide/-/esm-styleguide-3.4.1-pre.122.tgz#c6ce1ceb1900ac252402a0a947f9254f00beeecf" - integrity sha512-xMB0fm2zuRFWm8we8H/6JlTX5uLtInSBXoatzUZtWGqMWugMLGX2E9AoHSfCeQ2IULRD0+RSztioQ4gUfOkLog== +"@openmrs/esm-styleguide@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-styleguide/-/esm-styleguide-3.4.1-pre.133.tgz#5aca57670d0833dcee099a4b9672f1fdc86ffa90" + integrity sha512-gLuj1y28QtH91u0EWPNKWSpdQdVjrqwrhMkP0gPAEEt70MbPI9tGQx0++Cn4J82fTvT7ItvQ7sJyvIox14cEvw== dependencies: "@carbon/charts" "^0.41.57" carbon-components-react "7.31.0" lodash-es "^4.17.21" -"@openmrs/esm-utils@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/esm-utils/-/esm-utils-3.4.1-pre.122.tgz#050c16831f0658eb54215527cb0e92050f535fe1" - integrity sha512-HdsMn2MPq7DI5fF6SkY5bY7pwZpfB/6MMOQlFE+HQgxopkjZMZGv+uQgrS62xFrxtJN2XEcFh20BSgLiM5MxTg== +"@openmrs/esm-utils@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/esm-utils/-/esm-utils-3.4.1-pre.133.tgz#8b698334378a512262a13f895310b5b9027ebf40" + integrity sha512-jVAW5BCVANusOklqR7G5JeD/Pgr0MSeMV/txeqwPKSkbgX2vMThS9UMZRV4KwBoalKcPvzuqEWBbPo93eKZLDg== dependencies: semver "^7.3.2" -"@openmrs/webpack-config@^3.4.1-pre.122": - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/@openmrs/webpack-config/-/webpack-config-3.4.1-pre.122.tgz#1783a67a1e8bb937acb5709b15b8c1c9617ac535" - integrity sha512-dwqbgjCEmFZA6cVk1w716QxqQAqLFDDH7xBqWDWTnEsuK+ItJTgY/TJciJZeB9bfBdfIHmUUwsIRi/GPg70/mg== +"@openmrs/webpack-config@^3.4.1-pre.133": + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/@openmrs/webpack-config/-/webpack-config-3.4.1-pre.133.tgz#6c5855f3b7f0903fa686e417f2db9aefc6f49cb2" + integrity sha512-cyEEDPv/gvu8hMi/EyNrAG7vLhp8buZYT7IInhMg5ze4VtQrSZprk1gB9cAz33nHvjI00nnsuLPu2vheRWeJmA== dependencies: "@babel/core" "^7.17.9" "@babel/types" "^7.17.0" @@ -3254,9 +3296,9 @@ "@types/json-schema" "*" "@types/estree@*": - version "0.0.52" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.52.tgz#7f1f57ad5b741f3d5b210d3b1f145640d89bf8fe" - integrity sha512-BZWrtCU0bMVAIliIV+HJO1f1PR41M7NKjfxrFJwwhKI1KwhwOxYw1SXg9ao+CIMt774nFuGiG6eU+udtbEI9oQ== + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" + integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== "@types/estree@0.0.39": version "0.0.39" @@ -3287,11 +3329,6 @@ "@types/qs" "*" "@types/serve-static" "*" -"@types/fhir@0.0.30": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/fhir/-/fhir-0.0.30.tgz#a0aec3b2d7dd2a7584474dac446ede5f9a4d7a13" - integrity sha512-vDU62tUFeAYBVQThiWAfGd6D25TiLLDDS5pV19vim52FLpwWTBliLMvotbF4D/U+BmjxBKIuHGZgFnoh/HtV5g== - "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -3417,9 +3454,9 @@ integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ== "@types/node@*": - version "18.0.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.1.tgz#e91bd73239b338557a84d1f67f7b9e0f25643870" - integrity sha512-CmR8+Tsy95hhwtZBKJBs0/FFq4XX7sDZHlGGf+0q+BRZfMbOTkzkj0AFAuTyXbObDIoanaBBW0+KEW+m3N16Wg== + version "18.0.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.4.tgz#48aedbf35efb3af1248e4cd4d792c730290cd5d6" + integrity sha512-M0+G6V0Y4YV8cqzHssZpaNCqvYwlCiulmm0PwpNLF55r/+cT8Ol42CHRU1SEaYFH2rTwiiE1aYg/2g2rrtGdPA== "@types/node@16.9.1": version "16.9.1" @@ -3835,11 +3872,6 @@ mkdirp-promise "^5.0.1" mz "^2.5.0" -Base64@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.3.0.tgz#6da261a4e80d4fa0f5c684254e5bccd16bbdce9f" - integrity sha512-Jh2d5xGmLyzrzYpt2xdEiiAMbiCudzIGgDAeOqpg7f8nREA2DIjMDOp8k+PS2ELbrs2FvX5gyYRXYniZ6TkthA== - JSONStream@^1.0.4, JSONStream@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -4784,14 +4816,14 @@ browserslist-config-single-spa@^1.0.1: resolved "https://registry.yarnpkg.com/browserslist-config-single-spa/-/browserslist-config-single-spa-1.0.1.tgz#965f1f1606ba44671e649f410d8b8f735a327301" integrity sha512-nqOxTbatv6FcdgBvUTuH4MuojMZwvskspz5Y4dmpVcKd0uaQY8KEl3iALWus16+AwPVe3BIerBNEgELyaHZcQg== -browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.20.2, browserslist@^4.20.3, browserslist@^4.21.0: - version "4.21.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.1.tgz#c9b9b0a54c7607e8dc3e01a0d311727188011a00" - integrity sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ== +browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.20.2, browserslist@^4.20.3, browserslist@^4.21.1: + version "4.21.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.2.tgz#59a400757465535954946a400b841ed37e2b4ecf" + integrity sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA== dependencies: - caniuse-lite "^1.0.30001359" - electron-to-chromium "^1.4.172" - node-releases "^2.0.5" + caniuse-lite "^1.0.30001366" + electron-to-chromium "^1.4.188" + node-releases "^2.0.6" update-browserslist-db "^1.0.4" bser@2.1.1: @@ -5014,10 +5046,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001359: - version "1.0.30001363" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz#26bec2d606924ba318235944e1193304ea7c4f15" - integrity sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001366: + version "1.0.30001366" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001366.tgz#c73352c83830a9eaf2dea0ff71fb4b9a4bbaa89c" + integrity sha512-yy7XLWCubDobokgzudpkKux8e0UOOnLHE6mlNJBzT3lZJz6s5atSEzjoL+fsCPkI0G8MP5uVdDx1ur/fXEWkZA== capture-exit@^2.0.0: version "2.0.0" @@ -5230,9 +5262,9 @@ classnames@2.3.1: integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== clean-css@^5.2.2: - version "5.3.0" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.0.tgz#ad3d8238d5f3549e83d5f87205189494bc7cbb59" - integrity sha512-YYuuxv4H/iNb1Z/5IbMRoxgrzjWGhOEFfd+groZ5dMCVkpENiMZmwspdrzBo9286JjM1gZJPAyL7ZIdzuvu2AQ== + version "5.3.1" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.1.tgz#d0610b0b90d125196a2894d35366f734e5d7aa32" + integrity sha512-lCr8OHhiWCTw4v8POJovCoh4T7I9U11yVsPjMWWnnMmp9ZowCxyad1Pathle/9HjaDp+fdQKjO9fQydE6RHTZg== dependencies: source-map "~0.6.0" @@ -5729,11 +5761,11 @@ copy-webpack-plugin@^10.0.0: serialize-javascript "^6.0.0" core-js-compat@^3.21.0, core-js-compat@^3.22.1: - version "3.23.3" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.3.tgz#7d8503185be76bb6d8d592c291a4457a8e440aa9" - integrity sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw== + version "3.23.4" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.23.4.tgz#56ad4a352884317a15f6b04548ff7139d23b917f" + integrity sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q== dependencies: - browserslist "^4.21.0" + browserslist "^4.21.1" semver "7.0.0" core-js-pure@^3.20.2: @@ -6717,10 +6749,10 @@ ejs@^3.1.6: dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.172: - version "1.4.179" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.179.tgz#450561ade3ca3497dfed65af412c672972b2dad5" - integrity sha512-1XeTb/U/8Xgh2YgPOqhakLYsvCcU4U7jUjTMbEnhIJoIWd/Qt3yC8y0cbG+fHzn4zUNF99Ey1xiPf20bwgLO3Q== +electron-to-chromium@^1.4.188: + version "1.4.189" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.189.tgz#4e5b221dc44e09e9dddc9abbc6457857dee7ba25" + integrity sha512-dQ6Zn4ll2NofGtxPXaDfY2laIa6NyCQdqXYHdwH90GJQW0LpJJib0ZU/ERtbb0XkBEmUD2eJtagbOie3pdMiPg== emittery@^0.7.1: version "0.7.2" @@ -7399,17 +7431,6 @@ fecha@^4.2.0: resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== -fhir.js@0.0.22: - version "0.0.22" - resolved "https://registry.yarnpkg.com/fhir.js/-/fhir.js-0.0.22.tgz#5aea18d86ece91c1f590c8ba2cff79692bd1f924" - integrity sha512-+DUoaVMhxiDC53VTl41cBoJnp3NGaGQhQCi7HtXnGlfci5pmr8hQTYfd0axCVmKCrN5I28+/nhC8ANv2hVLFUg== - dependencies: - "@types/fhir" "0.0.30" - Base64 "~0.3.0" - merge "^1.2.1" - q "^1.4.1" - request "^2.88.0" - figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" @@ -9862,9 +9883,9 @@ jsonparse@^1.2.0: integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== jsonpointer@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.0.tgz#f802669a524ec4805fa7389eadbc9921d5dc8072" - integrity sha512-PNYZIdMjVIvVgDSYKTT63Y+KZ6IZvGRNNWcxwD+GNnUz1MKPfv30J8ueCjdwcN0nDx2SlshgyB7Oy0epAzVRRg== + version "5.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" + integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== jsprim@^1.2.2: version "1.4.2" @@ -10011,9 +10032,9 @@ levn@~0.3.0: type-check "~0.3.2" lilconfig@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" - integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== + version "2.0.6" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" + integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg== lines-and-columns@^1.1.6: version "1.2.4" @@ -10204,9 +10225,9 @@ lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17 integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== logform@^2.3.2, logform@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/logform/-/logform-2.4.1.tgz#512c9eaef738044d1c619790ba0f806c80d9d3a9" - integrity sha512-7XB/tqc3VRbri9pRjU6E97mQ8vC27ivJ3lct4jhyT+n0JNDd4YKldFl0D75NqDp46hk8RC7Ma1Vjv/UPf67S+A== + version "2.4.2" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.4.2.tgz#a617983ac0334d0c3b942c34945380062795b47c" + integrity sha512-W4c9himeAwXEdZ05dQNerhFz2XG80P9Oj0loPUMV23VC2it0orMHQhJm4hdnnor3rd1HsGf6a2lPwBM1zeXHGw== dependencies: "@colors/colors" "1.5.0" fecha "^4.2.0" @@ -10442,11 +10463,6 @@ merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -merge@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" - integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== - methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -10867,10 +10883,10 @@ node-notifier@^8.0.0: uuid "^8.3.0" which "^2.0.2" -node-releases@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666" - integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q== +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== nopt@^4.0.1: version "4.0.3" @@ -11164,13 +11180,13 @@ opener@^1.5.2: integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== openmrs@next: - version "3.4.1-pre.122" - resolved "https://registry.yarnpkg.com/openmrs/-/openmrs-3.4.1-pre.122.tgz#7a0d83a5af4b3fdecd1a9a5d57659f150d0d75f8" - integrity sha512-DKayD1WvzBFF6GwYTeyJP3PJnnWqKEJLcww8kla1hPwx/jr8af7RhYOeEYEO/ryabKNGNeaQVuE2KosOgjvP+A== + version "3.4.1-pre.133" + resolved "https://registry.yarnpkg.com/openmrs/-/openmrs-3.4.1-pre.133.tgz#2a13c444ecaedf115fbc0ad02ec14fd61eae6fad" + integrity sha512-wiVhuOC8zK3qMcCt60eMxyohYi4K324iIIhOzGzDQ8NOiaVCiWHlFwUMz7fPL1JeLK6wPR7xuBfZQwRYOQodig== dependencies: "@babel/preset-typescript" "^7.16.7" - "@openmrs/esm-app-shell" "^3.4.1-pre.122" - "@openmrs/webpack-config" "^3.4.1-pre.122" + "@openmrs/esm-app-shell" "^3.4.1-pre.133" + "@openmrs/webpack-config" "^3.4.1-pre.133" "@types/react" "^16.9.46" "@types/systemjs" "^6.1.0" autoprefixer "^10.4.2" @@ -12135,7 +12151,7 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -q@^1.4.1, q@^1.5.1: +q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== @@ -12258,12 +12274,11 @@ react-i18next@^11.0.0: html-parse-stringify "^3.0.1" react-i18next@^11.7.0: - version "11.17.4" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.17.4.tgz#fe72ac0ccacc73ae0a00fed503eb3dd3f73016c1" - integrity sha512-LswEIl8KNDTP4Wk3c22XDstbR++Vc4BZyNwvGFGaYbYDjdDLkHDLwrgd7DN28f8jufFHaYhQvCG5YWLxFhRt/g== + version "11.18.1" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.18.1.tgz#ba86ed09069e129b8623a28f2b9a03d7f105ea6f" + integrity sha512-S8cl4mvIOSA7OQCE5jNy2yhv705Vwi+7PinpqKIYcBmX/trJtHKqrf6CL67WJSA8crr2JU+oxE9jn9DQIrQezg== dependencies: "@babel/runtime" "^7.14.5" - html-escaper "^2.0.2" html-parse-stringify "^3.0.1" react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.6: @@ -12798,9 +12813,9 @@ rollup-plugin-terser@^7.0.0: terser "^5.0.0" rollup@^2.43.1: - version "2.75.7" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.75.7.tgz#221ff11887ae271e37dcc649ba32ce1590aaa0b9" - integrity sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ== + version "2.76.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.76.0.tgz#c69fe03db530ac53fcb9523b3caa0d3c0b9491a1" + integrity sha512-9jwRIEY1jOzKLj3nsY/yot41r19ITdQrhs+q3ggNWhr9TQgduHqANvPpS32RNpzGklJu3G1AJfvlZLi/6wFgWA== optionalDependencies: fsevents "~2.3.2" @@ -13903,9 +13918,9 @@ terser-webpack-plugin@^5.1.3: terser "^5.7.2" terser@^5.0.0, terser@^5.10.0, terser@^5.7.2: - version "5.14.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.1.tgz#7c95eec36436cb11cf1902cc79ac564741d19eca" - integrity sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ== + version "5.14.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" + integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" From a2f73c170b617c34a143e9d95662de0c15536c36 Mon Sep 17 00:00:00 2001 From: Brandon Istenes Date: Thu, 14 Jul 2022 10:04:26 -0700 Subject: [PATCH 6/6] Upgrade openmrs and @openmrs/esm-framework --- yarn.lock | 154 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 80 insertions(+), 74 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5ad785ec7..2be4686d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2818,19 +2818,20 @@ dependencies: "@octokit/openapi-types" "^12.4.0" -"@openmrs/esm-api@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-api/-/esm-api-3.4.1-pre.133.tgz#9b3b2299d1717167d96ab02a474aa269254e3093" - integrity sha512-+puhWWRh7dBT3c/h2ikYowubejedyhxK7xbnuoCfaTESleRyBe5qChQHbIcInx66r0iMAoaC8vNohfdemJB+lA== +"@openmrs/esm-api@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-api/-/esm-api-3.4.1-pre.139.tgz#a4de8bb7284ba825ef4ff458446fbdeb10a7bb11" + integrity sha512-jXyQLb9XNJ06YruhEp23BwD3JXQZraFBAj2OVyXc/7JT3ovnAEX2/QYwYkpWkIUdn11+rGZsWRVD2qUbXhh4jw== dependencies: + "@types/fhir" "0.0.31" lodash-es "^4.17.21" -"@openmrs/esm-app-shell@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-app-shell/-/esm-app-shell-3.4.1-pre.133.tgz#4256dd754be6314914c46fdbeebfdd9bd574c495" - integrity sha512-AX/uUBxePykr00DzAgu0Qcw2u5rLibu0Vu7lZOHx41wxU4L16NzC9sc1O9x6QQ7OPHejUrhh5oj3yoA1Ajwsaw== +"@openmrs/esm-app-shell@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-app-shell/-/esm-app-shell-3.4.1-pre.139.tgz#f8995aa5f01ab3c7910e6ed8d3c017e18877db99" + integrity sha512-mur0DdAzL5Ie8K98ASPRxW+um/uwOHO1DINYCyVSKRXRBIuNfP9MjeeHAElSK+hVx3SrUJZmuU9u4Z0j09Vd4w== dependencies: - "@openmrs/esm-framework" "^3.4.1-pre.133" + "@openmrs/esm-framework" "^3.4.1-pre.139" carbon-components "10.31.0" carbon-icons "7.0.7" dayjs "^1.10.4" @@ -2853,101 +2854,101 @@ workbox-strategies "^6.1.5" workbox-window "^6.1.5" -"@openmrs/esm-breadcrumbs@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-breadcrumbs/-/esm-breadcrumbs-3.4.1-pre.133.tgz#fd684a37430df09098174ff873fb107ed7ada759" - integrity sha512-v7VZtSwpFE0A9gftxPwPMzQsMoE9SeL0iIHC7vza9dcPzRBR+1tqiA6ir3K8jLq4sH4R5yVwQvNz6olG2PQ3QA== +"@openmrs/esm-breadcrumbs@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-breadcrumbs/-/esm-breadcrumbs-3.4.1-pre.139.tgz#51f8ca9dd68590a2d6b60eb0b17c55e8c8a42576" + integrity sha512-J6laf1R1jkitBB1AZ/61e/QcYcpuRqTAvDM/KgpFvYD00n9TnKNzTbwaZXBnnC7e4xjyp1y6732mrY5JGdK+wA== dependencies: path-to-regexp "6.1.0" -"@openmrs/esm-config@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-config/-/esm-config-3.4.1-pre.133.tgz#af04d99f1177c4bf3e6de218614e090f1b3e047e" - integrity sha512-DATM1suaJGViHgFLRvFiMvriYz1nbM+2ofx74oM14a0M3jD/eCowdUqqcOhU02J8YTu3HK+ItL27+hImtgEdrQ== +"@openmrs/esm-config@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-config/-/esm-config-3.4.1-pre.139.tgz#7ff73fa96da74b64b972773aaa45a1933f839008" + integrity sha512-XroEDOXbLPDn/zzgDTui2yUw6BF3TIjnnxH3l5e0hq2ny+m0KsCxILvNk/7FB8QXoFO0ii9Fud6bAVB6gqF44A== dependencies: ramda "^0.26.1" -"@openmrs/esm-error-handling@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-error-handling/-/esm-error-handling-3.4.1-pre.133.tgz#eb73ad456a306bb733f73b75995386233ebe4ae7" - integrity sha512-bz+TgZnUQa5Vzv7tp0Oi4LAr/A7ZihLy4rk0nCgu+IbVDrXFh1fPYhzniML2Qy9CqNcWFhQt+YI4iJOD7OoSkg== +"@openmrs/esm-error-handling@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-error-handling/-/esm-error-handling-3.4.1-pre.139.tgz#4a6cb64d9ccbfd54f51151c9e9c759d0ba815f91" + integrity sha512-ijTcNXjCMTokFEknQJmLpV4qtxcnuLzzarb+EyP230To34wNwibGDQguQrlz0HznkDWwxSmTKW+zc65yANFDfg== -"@openmrs/esm-extensions@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-extensions/-/esm-extensions-3.4.1-pre.133.tgz#bca2031c939d8f1514580f0a743f919ad08cea66" - integrity sha512-I5qCjw/O4clY6+Jlnm4r+pXq+mzPC68fHA2jYaN1Tm18ulkdFKx0YM6/McHIwxj6CNl6wZNyzpD7wtkV9AFs2Q== +"@openmrs/esm-extensions@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-extensions/-/esm-extensions-3.4.1-pre.139.tgz#4ab0465eee85418f38efa638b111408c488517a9" + integrity sha512-RqXI78GPIZ7K32oTyiZCkslHeGGCgFkTekBzxZgkwT+NBQdsIywiHMI/yju4ZxFv9VWtxGXPhqtlmNSWLOyZrw== dependencies: lodash-es "^4.17.21" -"@openmrs/esm-framework@^3.4.1-pre.133", "@openmrs/esm-framework@next": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-framework/-/esm-framework-3.4.1-pre.133.tgz#2c4093effe43a022a27812f059721e90c848e747" - integrity sha512-Hc5IbjlkQNMP/m9DurYOhnGMB83Z2L13gvUj/HVihPoq8VijPYEQ9lFDBJjyBP/TY2u3vNkorbb5FWMIat9uQw== - dependencies: - "@openmrs/esm-api" "^3.4.1-pre.133" - "@openmrs/esm-breadcrumbs" "^3.4.1-pre.133" - "@openmrs/esm-config" "^3.4.1-pre.133" - "@openmrs/esm-error-handling" "^3.4.1-pre.133" - "@openmrs/esm-extensions" "^3.4.1-pre.133" - "@openmrs/esm-globals" "^3.4.1-pre.133" - "@openmrs/esm-offline" "^3.4.1-pre.133" - "@openmrs/esm-react-utils" "^3.4.1-pre.133" - "@openmrs/esm-state" "^3.4.1-pre.133" - "@openmrs/esm-styleguide" "^3.4.1-pre.133" - "@openmrs/esm-utils" "^3.4.1-pre.133" +"@openmrs/esm-framework@^3.4.1-pre.139", "@openmrs/esm-framework@next": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-framework/-/esm-framework-3.4.1-pre.139.tgz#072b0619ae72ef01f96af49bd35d6592f6c10fe7" + integrity sha512-snPkUGPKgIUqxPRS93su2pfS0Zm7/g/Bu09s6hLZCoObgP3ka/gGboicjFxcTJ0UefpOwMQnPGxfV68Xoqw23w== + dependencies: + "@openmrs/esm-api" "^3.4.1-pre.139" + "@openmrs/esm-breadcrumbs" "^3.4.1-pre.139" + "@openmrs/esm-config" "^3.4.1-pre.139" + "@openmrs/esm-error-handling" "^3.4.1-pre.139" + "@openmrs/esm-extensions" "^3.4.1-pre.139" + "@openmrs/esm-globals" "^3.4.1-pre.139" + "@openmrs/esm-offline" "^3.4.1-pre.139" + "@openmrs/esm-react-utils" "^3.4.1-pre.139" + "@openmrs/esm-state" "^3.4.1-pre.139" + "@openmrs/esm-styleguide" "^3.4.1-pre.139" + "@openmrs/esm-utils" "^3.4.1-pre.139" dayjs "^1.10.7" -"@openmrs/esm-globals@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-globals/-/esm-globals-3.4.1-pre.133.tgz#995a94b9cd2686793ff4f6d11742ea3e52b9a12c" - integrity sha512-J63SEFdPlnIERvvKxFRHCBrgOysVn/24osiqcmihAEA6XK1/TmOTfUcnQkbfUv3tWg2pbLjX3jlfX4l7yrp3yA== +"@openmrs/esm-globals@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-globals/-/esm-globals-3.4.1-pre.139.tgz#07bb21d57c9379f2bbeb8694228aa8bc537ecd4e" + integrity sha512-lowC/GATQxKOjtE02iYcGw4OW7TzewZOh6/K64s+VLUyFFnVWQUYkADR9GqNTLQ9G+lg5gla1Kg8JFhRBg7Mxg== -"@openmrs/esm-offline@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-offline/-/esm-offline-3.4.1-pre.133.tgz#6fc930b8568de3795f4914802a7fc5139d3edaab" - integrity sha512-if+LKYzr0d05rQrAcRXW83J3uN6E6WfJc30MyXpoP5k/CdVpopGxQMlolBRPQeJarlZn5sqDwi8l2IkWDosJAw== +"@openmrs/esm-offline@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-offline/-/esm-offline-3.4.1-pre.139.tgz#80059b1eb9526759df383633b98dea2767e5dc06" + integrity sha512-VhkgGxmXO9b1l/hpvarUq+L20Rp5UZI68NsRbVXYSFq481svUXLZTZaICP/VP+fdqzWY9tcEfS/FuYoGdiWXKA== dependencies: dexie "^3.0.3" lodash-es "4.17.21" uuid "^8.3.2" workbox-window "^6.1.5" -"@openmrs/esm-react-utils@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-react-utils/-/esm-react-utils-3.4.1-pre.133.tgz#76261860776135df9b65ef99cf2008b46940b88f" - integrity sha512-mJHzKrBfsmFm5rvFU0sGWtau5yKv/72SuMvpFhiWqHmlfu6LKyyvcvU/hykVIMGW5dUbEaQVOhdZfskucfwz5g== +"@openmrs/esm-react-utils@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-react-utils/-/esm-react-utils-3.4.1-pre.139.tgz#4058414c731cabcb327ada9753eedc6814f8d4d4" + integrity sha512-CIPANdulsR06cRbO5FY9bQ7+OPENbJID/jsPAZ+V03NkXPlGqkU/RT73E6GtFGN7tFdcRF7lXPD24swJODXT0Q== dependencies: lodash-es "^4.17.21" single-spa-react "^4.1.1" swr "^1.2.2" -"@openmrs/esm-state@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-state/-/esm-state-3.4.1-pre.133.tgz#be1fa19ba5dcdc3711cc1d9bb2e1c127ec4ad83d" - integrity sha512-T6+z9QOXC4pEAJyAUiPueEpQlS3cqCSCbpxfpTUoZuZ1dMttvmjn9w3oTx2a1A2UeFcRRI/y3u4U6I6ESfSOFQ== +"@openmrs/esm-state@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-state/-/esm-state-3.4.1-pre.139.tgz#acf4167451155697207c288370dd22e388cbc91d" + integrity sha512-O0/Z/5ynQdNHThYcF7DJrFWwxVX6H8ZiGEU5U3puZi6aQn1JrJGLkZ69aWFFCrlsGBd2+u9N3ng2eW8H74TXdg== dependencies: unistore "^3.5.2" -"@openmrs/esm-styleguide@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-styleguide/-/esm-styleguide-3.4.1-pre.133.tgz#5aca57670d0833dcee099a4b9672f1fdc86ffa90" - integrity sha512-gLuj1y28QtH91u0EWPNKWSpdQdVjrqwrhMkP0gPAEEt70MbPI9tGQx0++Cn4J82fTvT7ItvQ7sJyvIox14cEvw== +"@openmrs/esm-styleguide@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-styleguide/-/esm-styleguide-3.4.1-pre.139.tgz#de121bbe59ea3c755549d395faa5f8fa8cf37231" + integrity sha512-I76btcMzGdJUNQkNHAi9clsY9bI5lOQTfVLMd90Cq0b/fsSvJaidEvzvQ2A+lXFVhdcVaVhE7OC2U2tecxPplw== dependencies: "@carbon/charts" "^0.41.57" carbon-components-react "7.31.0" lodash-es "^4.17.21" -"@openmrs/esm-utils@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/esm-utils/-/esm-utils-3.4.1-pre.133.tgz#8b698334378a512262a13f895310b5b9027ebf40" - integrity sha512-jVAW5BCVANusOklqR7G5JeD/Pgr0MSeMV/txeqwPKSkbgX2vMThS9UMZRV4KwBoalKcPvzuqEWBbPo93eKZLDg== +"@openmrs/esm-utils@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/esm-utils/-/esm-utils-3.4.1-pre.139.tgz#737ec5cd643f992b4e57a4230356a614b003e360" + integrity sha512-KmwNmsULlrSatVo7Tk3ofNxPsz3DzGrSnNIjXEqs4W7hrOOgZiTZ5HpeJJNlxQQAx4DfwcX96NaxdO3TZ5Rh/w== dependencies: semver "^7.3.2" -"@openmrs/webpack-config@^3.4.1-pre.133": - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/@openmrs/webpack-config/-/webpack-config-3.4.1-pre.133.tgz#6c5855f3b7f0903fa686e417f2db9aefc6f49cb2" - integrity sha512-cyEEDPv/gvu8hMi/EyNrAG7vLhp8buZYT7IInhMg5ze4VtQrSZprk1gB9cAz33nHvjI00nnsuLPu2vheRWeJmA== +"@openmrs/webpack-config@^3.4.1-pre.139": + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/@openmrs/webpack-config/-/webpack-config-3.4.1-pre.139.tgz#d273907ee024a6d3e343a2401106368510dcbbf8" + integrity sha512-SImxHxmw2mnw91GG26HNVflEra2Rszk2Fgni2l5g+mu891qDcNa2CPeq7oXzM1lDWIwm2Wg0Ny/ikO46JtxTEQ== dependencies: "@babel/core" "^7.17.9" "@babel/types" "^7.17.0" @@ -3329,6 +3330,11 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/fhir@0.0.31": + version "0.0.31" + resolved "https://registry.yarnpkg.com/@types/fhir/-/fhir-0.0.31.tgz#067392154124125dccc97e51a4297d448467c211" + integrity sha512-YF6+X+hMYLvNGB5r8LxGKPMrSqqFkyLefTQZ/8bAnr0XW8Xc2Mgf8OJ06+cj1b5ftJoeLblHpIYgKdhXdFAzrw== + "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -11180,13 +11186,13 @@ opener@^1.5.2: integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== openmrs@next: - version "3.4.1-pre.133" - resolved "https://registry.yarnpkg.com/openmrs/-/openmrs-3.4.1-pre.133.tgz#2a13c444ecaedf115fbc0ad02ec14fd61eae6fad" - integrity sha512-wiVhuOC8zK3qMcCt60eMxyohYi4K324iIIhOzGzDQ8NOiaVCiWHlFwUMz7fPL1JeLK6wPR7xuBfZQwRYOQodig== + version "3.4.1-pre.139" + resolved "https://registry.yarnpkg.com/openmrs/-/openmrs-3.4.1-pre.139.tgz#80044dd061006f340b07c8fe90ddc216154d8405" + integrity sha512-el+jbD3FPuI0+GOSkbKBdOXWMKERM3xTwu2cJ3yFnBHyWDBXUlSnrPm9TcbJqpL3VsEY8s0SRxX0rWZvqxKxng== dependencies: "@babel/preset-typescript" "^7.16.7" - "@openmrs/esm-app-shell" "^3.4.1-pre.133" - "@openmrs/webpack-config" "^3.4.1-pre.133" + "@openmrs/esm-app-shell" "^3.4.1-pre.139" + "@openmrs/webpack-config" "^3.4.1-pre.139" "@types/react" "^16.9.46" "@types/systemjs" "^6.1.0" autoprefixer "^10.4.2"