@kenyaemr/esm-patient-registration-app 4.6.0 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/130.js +1 -1
- package/dist/130.js.LICENSE.txt +0 -2
- package/dist/130.js.map +1 -1
- package/dist/152.js +1 -0
- package/dist/152.js.map +1 -0
- package/dist/255.js +2 -0
- package/dist/255.js.map +1 -0
- package/dist/303.js +1 -0
- package/dist/303.js.map +1 -0
- package/dist/319.js +1 -1
- package/dist/330.js +1 -1
- package/dist/388.js +2 -0
- package/dist/388.js.LICENSE.txt +34 -0
- package/dist/388.js.map +1 -0
- package/dist/460.js +1 -1
- package/dist/537.js +1 -1
- package/dist/537.js.map +1 -1
- package/dist/574.js +1 -1
- package/dist/59.js +1 -0
- package/dist/59.js.map +1 -0
- package/dist/598.js +1 -0
- package/dist/598.js.map +1 -0
- package/dist/62.js +1 -1
- package/dist/62.js.map +1 -1
- package/dist/729.js +1 -0
- package/dist/729.js.map +1 -0
- package/dist/735.js +1 -1
- package/dist/757.js +1 -1
- package/dist/788.js +1 -1
- package/dist/807.js +1 -1
- package/dist/833.js +1 -1
- package/dist/840.js +1 -0
- package/dist/840.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +35 -0
- package/dist/main.js.map +1 -1
- package/dist/openmrs-esm-patient-registration-app.js +1 -1
- package/dist/openmrs-esm-patient-registration-app.js.buildmanifest.json +114 -221
- package/dist/openmrs-esm-patient-registration-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +4 -3
- package/src/declarations.d.ts +2 -0
- package/src/index.ts +23 -14
- package/src/patient-registration/field/address/address-field.component.tsx +2 -2
- package/src/patient-registration/field/address/custom-address-field.component.tsx +3 -2
- package/src/patient-registration/field/dob/dob.component.tsx +51 -42
- package/src/patient-registration/field/dob/dob.test.tsx +1 -14
- package/src/patient-registration/field/field.resource.ts +5 -5
- package/src/patient-registration/field/id/id-field.component.tsx +8 -6
- package/src/patient-registration/field/id/{identifier-selection-overlay.tsx → identifier-selection-overlay.component.tsx} +27 -23
- package/src/patient-registration/field/obs/obs-field.component.tsx +4 -3
- package/src/patient-registration/field/person-attributes/coded-attributes.component.tsx +2 -1
- package/src/patient-registration/field/person-attributes/coded-person-attribute-field.component.tsx +4 -3
- package/src/patient-registration/field/person-attributes/person-attribute-field.component.tsx +8 -2
- package/src/patient-registration/field/person-attributes/person-attributes.resource.tsx +1 -1
- package/src/patient-registration/field/person-attributes/text-person-attribute-field.component.tsx +3 -2
- package/src/patient-registration/input/basic-input/input/input.component.tsx +122 -2
- package/src/patient-registration/input/combo-input/combo-input.component.tsx +7 -6
- package/src/patient-registration/input/custom-input/autosuggest/autosuggest.component.tsx +109 -6
- package/src/patient-registration/input/custom-input/autosuggest/autosuggest.scss +9 -0
- package/src/patient-registration/input/custom-input/autosuggest/autosuggest.test.tsx +2 -2
- package/src/patient-registration/input/dummy-data/dummy-data-input.component.tsx +2 -1
- package/src/patient-registration/patient-registration.component.tsx +49 -44
- package/src/patient-registration/patient-registration.resource.tsx +18 -7
- package/src/patient-registration/patient-registration.scss +6 -0
- package/src/patient-registration/patient-registration.test.tsx +19 -21
- package/src/patient-registration/section/death-info/death-info-section.component.tsx +2 -1
- package/src/patient-registration/section/demographics/demographics-section.test.tsx +1 -14
- package/src/patient-registration/section/patient-relationships/relationships-section.component.tsx +27 -20
- package/src/patient-registration/section/patient-relationships/relationships.resource.tsx +1 -1
- package/src/patient-registration/validation/patient-registration-validation.tsx +6 -0
- package/src/root.component.tsx +3 -2
- package/src/routes.json +7 -0
- package/translations/am.json +18 -7
- package/translations/ar.json +17 -6
- package/translations/en.json +16 -5
- package/translations/es.json +17 -6
- package/translations/fr.json +18 -7
- package/translations/he.json +28 -17
- package/translations/km.json +30 -19
- package/dist/117.js +0 -2
- package/dist/117.js.map +0 -1
- package/dist/218.js +0 -1
- package/dist/218.js.map +0 -1
- package/dist/275.js +0 -1
- package/dist/275.js.map +0 -1
- package/dist/317.js +0 -2
- package/dist/317.js.LICENSE.txt +0 -6
- package/dist/317.js.map +0 -1
- package/dist/348.js +0 -1
- package/dist/348.js.map +0 -1
- package/dist/520.js +0 -2
- package/dist/520.js.LICENSE.txt +0 -14
- package/dist/520.js.map +0 -1
- package/dist/635.js +0 -1
- package/dist/635.js.map +0 -1
- package/dist/68.js +0 -1
- package/dist/68.js.map +0 -1
- package/dist/693.js +0 -1
- package/dist/693.js.map +0 -1
- package/dist/742.js +0 -1
- package/dist/742.js.map +0 -1
- package/dist/857.js +0 -1
- package/dist/857.js.map +0 -1
- package/dist/975.js +0 -1
- package/dist/975.js.map +0 -1
- /package/dist/{117.js.LICENSE.txt → 255.js.LICENSE.txt} +0 -0
- /package/src/patient-registration/ui-components/overlay/{index.tsx → overlay.component.tsx} +0 -0
package/dist/68.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"68.js","mappings":"2NAAA,iB,guBA4EO,IAAMA,EAA4C,CACvD,CACEC,GAAI,eACJC,KAAM,aACNC,OAAQ,CAAC,OAAQ,SAAU,MAAO,OAEpC,CAAEF,GAAI,UAAWC,KAAM,kBAAmBC,OAAQ,CAAC,UAAW,UAC9D,CAAEF,GAAI,QAASC,KAAM,aAAcC,OAAQ,IAC3C,CAAEF,GAAI,gBAAiBC,KAAM,gBAAiBC,OAAQ,KAG3CC,EAAgB,CAAC,OAAQ,SAAU,MAAO,UAAW,KAAM,iBAE3DC,EAA+B,CAC1CC,SAAU,CACRC,MAAOC,EAAAA,KAAKC,MACZC,SAAU,CAAC,eAAgB,UAAW,iBACtCC,aAAc,gHAEE,OAF8GX,EAC3HY,KAAI,SAACC,G,OAAMA,EAAEZ,E,IACba,KAAK,QAAQ,MAChBC,UAAW,CACTR,MAAOC,EAAAA,KAAKQ,SAGhBC,mBAAoB,CAClBV,MAAOC,EAAAA,KAAKC,MACZM,UAAW,CACTd,GAAI,CACFM,MAAOC,EAAAA,KAAKQ,OACZ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,U,kBCvNtB,IAAI9P,EAAM,CACT,YAAa,CACZ,KACA,KAED,YAAa,CACZ,KACA,KAED,YAAa,CACZ,KACA,KAED,YAAa,CACZ,KACA,KAED,YAAa,CACZ,KACA,KAED,YAAa,CACZ,KACA,KAED,YAAa,CACZ,KACA,MAGF,SAASqW,EAAoBC,GAC5B,IAAIC,EAAoBC,EAAExW,EAAKsW,GAC9B,OAAOlR,QAAQqR,UAAUC,MAAK,KAC7B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEE,KAAO,mBACHF,CAAC,IAIT,IAAIG,EAAM9W,EAAIsW,GAAMjX,EAAKyX,EAAI,GAC7B,OAAOP,EAAoBI,EAAEG,EAAI,IAAIJ,MAAK,IAClCH,EAAoBlX,IAE7B,CACAgX,EAAoBrO,KAAO,IAAO7F,OAAO6F,KAAKhI,GAC9CqW,EAAoBhX,GAAK,KACzB0X,EAAOC,QAAUX,C","sources":["webpack://@kenyaemr/esm-patient-registration-app/./src/config-schema.ts","webpack://@kenyaemr/esm-patient-registration-app/./src/constants.ts","webpack://@kenyaemr/esm-patient-registration-app/./src/offline.ts","webpack://@kenyaemr/esm-patient-registration-app/./src/index.ts","webpack://@kenyaemr/esm-patient-registration-app/./src/offline.resources.ts","webpack://@kenyaemr/esm-patient-registration-app/./src/patient-registration/form-manager.ts","webpack://@kenyaemr/esm-patient-registration-app/./src/patient-registration/patient-registration.resource.tsx","webpack://@kenyaemr/esm-patient-registration-app/./translations/ lazy nonrecursive .json$"],"names":["builtInSections","id","name","fields","builtInFields","esmPatientRegistrationSchema","sections","_type","Type","Array","_default","_description","map","s","join","_elements","String","sectionDefinitions","fieldDefinitions","type","uuid","UUID","showHeading","Boolean","label","placeholder","validation","required","matches","answerConceptSetUuid","ConceptUuid","customConceptAnswers","fieldConfigurations","displayMiddleName","allowUnidentifiedPatients","defaultUnknownGivenName","defaultUnknownFamilyName","displayCapturePhoto","displayReverseFieldOrder","gender","value","address","useAddressHierarchy","enabled","useQuickSearch","searchAddressByLevel","useAddressHierarchyLabel","Object","dateOfBirth","allowEstimatedDateOfBirth","useEstimatedDateOfBirth","dayOfMonth","Number","month","links","submitButton","_validators","validators","isUrlWithTemplateParameters","concepts","patientPhotoUuid","defaultPatientIdentifierTypes","PatientIdentifierTypeUuid","registrationObs","encounterTypeUuid","encounterProviderRoleUuid","registrationFormUuid","validator","config","some","d","every","sDef","includes","allowedSections","badSection","find","stringifyDefinitions","length","sectionDefinition","f","fDef","allowedFields","badField","personRelationshipRepresentation","moduleName","patientRegistration","cacheForOfflineHeaders","omrsOfflineCachingStrategyHttpHeaderName","getPatientUrlsToBeCached","patientUuid","url","window","origin","makeUrl","precacheStaticAssets","Promise","all","fetchCurrentSession","fetchAddressTemplate","fetchAllRelationshipTypes","fetchAllFieldDefinitionTypes","fetchPatientIdentifierTypesWithSources","syncPatientRegistration","queuedPatient","options","FormManager","savePatientFormOnline","_patientRegistrationData","isNewPatient","formValues","patientUuidMap","initialAddressFieldValues","capturePhotoProps","currentLocation","initialIdentifierValues","currentUser","savePatientTransactionManager","abort","importTranslation","require","featureName","startupApp","defineConfigSchema","registerBreadcrumbs","path","spaBase","title","parent","setupOfflineSync","onBeginEditSyncItem","syncItem","navigate","to","content","fhirPatient","setupDynamicOfflineDataHandler","displayName","isSynced","expectedUrls","keys","caches","open","key","sync","urlsToCache","allSettled","messageOmrsServiceWorker","fetch","root","getAsyncLifecycle","editPatient","addPatientLink","cancelPatientEditModal","patientPhoto","editPatientDetailsButton","deleteIdentifierConfirmationModal","confirmClientRegistryModal","emptyClientRegistryModal","ResourcesContext","React","cacheAndFetch","data","fieldDefinitionPromises","getConfig","def","fieldDefinition","fetchFieldDefinitionType","reduce","merged","result","push","apiUrl","patientIdentifierTypes","identifierTypes","autoGenOptions","allIdentifierSources","i","fetchPatientIdentifierTypes","filter","fetchAutoGenerationOptions","identifierType","fetchIdentifierSources","identifierSources","results","source","option","autoGenerationOption","patientIdentifierTypesResponse","primaryIdentifierTypeResponse","primaryIdentifierTypeUuid","ok","metadataUuid","mapPatientIdentifierType","forEach","abortController","AbortController","pattern","escapeRegExp","openmrsFetch","headers","signal","patientIdentifierType","isPrimary","display","fieldName","camelCase","format","uniquenessBehavior","saveRelationships","relationships","savePatientResponse","m","relationshipType","relationship","action","relatedPersonUuid","split","direction","thisPatientUuid","isAToB","relationshipToSave","personA","personB","saveRelationship","updateRelationship","relationshipUuid","deleteRelationship","saveObservations","obss","encounterToSave","encounterDatetime","Date","patient","encounterType","location","encounterProviders","provider","currentProvider","encounterRole","form","obs","entries","concept","conceptUuid","saveEncounter","console","error","savePatientIdentifiers","patientIdentifiers","identifierTypeRequests","values","identifierValue","autoGeneration","selectedSource","patientIdentifier","identifierTypeUuid","identifierUuid","preferred","initialValue","identifier","identifierToCreate","generateIdentifier","addPatientIdentifier","updatePatientIdentifier","identifierFieldName","deletePatientIdentifier","getDeletedNames","additionalNameUuid","nameUuid","personUuid","getPatientToCreate","identifiers","birthdate","getFullYear","getMonth","getDate","person","names","getNames","charAt","birthdateEstimated","attributes","getPatientAttributes","addresses","getPatientDeathInfo","preferredNameUuid","givenName","middleName","familyName","addNameInLocalLanguage","additionalGivenName","additionalMiddleName","additionalFamilyName","attributeType","attributeUuid","method","catch","err","isDead","deathDate","deathCause","dead","undefined","causeOfDeath","mapPatientToFhirPatient","M","F","O","U","birthDate","deceasedBoolean","deceasedDateTime","given","family","city","cityVillage","country","postalCode","state","stateProvince","use","telecom","attribute","savePatientFormOffline","SavePatientTransactionManager","queueSynchronizationItem","dependencies","createdPatient","deletePersonName","savePatient","patientSaved","imageData","savePatientPhoto","dateTime","toISOString","updatePatientUuid","body","encounter","date","formData","FormData","append","dataURI","byteString","atob","mimeString","buffer","Uint8Array","charCodeAt","blob","Blob","File","dataURItoFile","JSON","stringify","groupMembers","obsDatetime","usePatientPhoto","item","useConfig","useSWR","isLoading","imageSrc","uri","isError","fetchPerson","query","patientIdentifierUuid","webpackAsyncContext","req","__webpack_require__","o","resolve","then","e","Error","code","ids","module","exports"],"sourceRoot":""}
|
package/dist/693.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_kenyaemr_esm_patient_registration_app=globalThis.webpackChunk_kenyaemr_esm_patient_registration_app||[]).push([[693],{6788:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__address-search__label01___oURHe{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-patient-registration__address-search__suggestions___eCtFr{border-top-width:0;list-style:none;margin-top:0;max-height:20rem;overflow-y:auto;padding-left:0;width:100%;position:absolute;left:0;background-color:#fff;margin-bottom:20px;z-index:99;border:1px solid #e0e0e0}.-esm-patient-registration__address-search__suggestions___eCtFr li{padding:1rem;line-height:1.29;color:#525252;border-bottom:1px solid #8d8d8d}.-esm-patient-registration__address-search__suggestions___eCtFr li:hover{background-color:#e5e5e5;color:#161616;cursor:pointer}.-esm-patient-registration__address-search__suggestions___eCtFr li:not(:last-of-type){border-bottom:1px solid #999}.-esm-patient-registration__address-search__autocomplete___ziYIM{position:relative}.-esm-patient-registration__address-search__autocompleteSearch____mzpI{width:100%}.-esm-patient-registration__address-search__suggestions___eCtFr a{color:inherit;text-decoration:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/field/address/address-search.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,4DCs0BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CDl0BJ,gEACE,kBAAA,CACA,eAAA,CACA,YAAA,CACA,gBAAA,CACA,eAAA,CACA,cAAA,CACA,UAAA,CACA,iBAAA,CACA,MAAA,CACA,qBAAA,CACA,kBAAA,CACA,UAAA,CACA,wBAAA,CAGF,mEACE,YEMW,CFLX,gBAAA,CACA,aAAA,CACA,+BAAA,CAGF,yEACE,wBAAA,CACA,aAAA,CACA,cAAA,CAGF,sFACE,4BAAA,CAGF,iEACE,iBAAA,CAGF,uEACE,UAAA,CAGF,kEACE,aAAA,CACA,oBAAA",sourceRoot:""}]),o.locals={label01:"-esm-patient-registration__address-search__label01___oURHe",suggestions:"-esm-patient-registration__address-search__suggestions___eCtFr",autocomplete:"-esm-patient-registration__address-search__autocomplete___ziYIM",autocompleteSearch:"-esm-patient-registration__address-search__autocompleteSearch____mzpI"};const s=o},6680:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__field__productiveHeading02___B7YQg{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-bottom:1rem}.-esm-patient-registration__field__productiveHeading02Light___Kitgy{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);margin-bottom:1rem;color:#525252}.-esm-patient-registration__field__label01___XhEuH{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-patient-registration__field__grid___kG494{display:grid;grid-template-columns:1fr 1fr;column-gap:1rem}.-esm-patient-registration__field__halfWidthInDesktopView___bN6Sw{width:calc(50% - 1rem)}.-esm-patient-registration__field__patientPhoto___qrH4P{display:flex;justify-content:center}.-esm-patient-registration__field__nameField___tUkky{grid-row:1;grid-column:1}.-esm-patient-registration__field__nameField___tUkky>.cds--content-switcher{display:grid;grid-template-columns:1fr 1fr;width:max-content;justify-content:flex-start}.-esm-patient-registration__field__contentSwitcher___ReJS6{margin-bottom:1rem}.-esm-patient-registration__field__dobField___r5Uum>.cds--content-switcher{display:grid;grid-template-columns:1fr 1fr;width:max-content;justify-content:flex-start}.-esm-patient-registration__field__photoExtension___eUcYn{margin-bottom:1rem;grid-row:1;grid-column:2;justify-self:center}.-esm-patient-registration__field__sexField___WBNSZ,.-esm-patient-registration__field__dobField___r5Uum{margin-bottom:1rem}.-esm-patient-registration__field__dobContentSwitcherLabel___f3ZOM{margin-bottom:.5rem}.-esm-patient-registration__field__identifierLabelText___CUAVo{display:flex;align-items:center}.-esm-patient-registration__field__setIDNumberButton___MPk53{margin-bottom:1rem}.-esm-patient-registration__field__setIDNumberButton___MPk53>svg{margin-left:.5rem}.-esm-patient-registration__field__customField___FqVZp{margin-bottom:1rem}.-esm-patient-registration__field__attributeField___f6fQL{margin-bottom:1rem}.omrs-breakpoint-lt-desktop .-esm-patient-registration__field__grid___kG494{grid-template-columns:1fr;grid-template-rows:auto auto}.omrs-breakpoint-lt-desktop .-esm-patient-registration__field__nameField___tUkky{grid-row:2;grid-column:1}.omrs-breakpoint-lt-desktop .-esm-patient-registration__field__photoExtension___eUcYn{grid-column:1;grid-row:1;justify-self:start}.omrs-breakpoint-lt-desktop .-esm-patient-registration__field__radioButton___yvufj label{height:3rem !important}.omrs-breakpoint-lt-desktop .-esm-patient-registration__field__halfWidthInDesktopView___bN6Sw{width:100%}.-esm-patient-registration__field__radioFieldError___Y8du_{color:#da1e28;display:block;font-weight:400;max-height:12.5rem;overflow:visible;font-size:.75rem;letter-spacing:.32px;line-height:1.34;margin:.25rem 0 0}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/field/field.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,+DCs0BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CDp0BF,kBAAA,CAGF,oECi0BI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CD/zBF,kBAAA,CACA,aAAA,CAGF,mDC2zBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CDvzBJ,gDACE,YAAA,CACA,6BAAA,CACA,eESW,CFNb,kEACE,sBAAA,CAGF,wDACE,YAAA,CACA,sBAAA,CAGF,qDACE,UAAA,CACA,aAAA,CAGF,4EACE,YAAA,CACA,6BAAA,CACA,iBAAA,CACA,0BAAA,CAGF,2DACE,kBAAA,CAGF,2EACE,YAAA,CACA,6BAAA,CACA,iBAAA,CACA,0BAAA,CAGF,0DACE,kBAAA,CACA,UAAA,CACA,aAAA,CACA,mBAAA,CAGF,wGAEE,kBEnCW,CFsCb,mEACE,mBEjDW,CFoDb,+DACE,YAAA,CACA,kBAAA,CAGF,6DACE,kBEhDW,CFmDb,iEACE,iBE9DW,CFiEb,uDACE,kBExDW,CF2Db,0DACE,kBE5DW,CFgEX,4EACE,yBAAA,CACA,4BAAA,CAEF,iFACE,UAAA,CACA,aAAA,CAEF,sFACE,aAAA,CACA,UAAA,CACA,kBAAA,CAEF,yFACE,sBAAA,CAEF,8FACE,UAAA,CAIJ,2DACE,aAAA,CACA,aAAA,CACA,eAAA,CACA,kBAAA,CACA,gBAAA,CACA,gBAAA,CACA,oBAAA,CACA,gBAAA,CACA,iBAAA",sourceRoot:""}]),o.locals={productiveHeading02:"-esm-patient-registration__field__productiveHeading02___B7YQg",productiveHeading02Light:"-esm-patient-registration__field__productiveHeading02Light___Kitgy",label01:"-esm-patient-registration__field__label01___XhEuH",grid:"-esm-patient-registration__field__grid___kG494",halfWidthInDesktopView:"-esm-patient-registration__field__halfWidthInDesktopView___bN6Sw",patientPhoto:"-esm-patient-registration__field__patientPhoto___qrH4P",nameField:"-esm-patient-registration__field__nameField___tUkky",contentSwitcher:"-esm-patient-registration__field__contentSwitcher___ReJS6",dobField:"-esm-patient-registration__field__dobField___r5Uum",photoExtension:"-esm-patient-registration__field__photoExtension___eUcYn",sexField:"-esm-patient-registration__field__sexField___WBNSZ",dobContentSwitcherLabel:"-esm-patient-registration__field__dobContentSwitcherLabel___f3ZOM",identifierLabelText:"-esm-patient-registration__field__identifierLabelText___CUAVo",setIDNumberButton:"-esm-patient-registration__field__setIDNumberButton___MPk53",customField:"-esm-patient-registration__field__customField___FqVZp",attributeField:"-esm-patient-registration__field__attributeField___f6fQL",radioButton:"-esm-patient-registration__field__radioButton___yvufj",radioFieldError:"-esm-patient-registration__field__radioFieldError___Y8du_"};const s=o},1033:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__identifier-selection__title___id4Ma{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__identifier-selection__submit___EFvNk{width:250px}.-esm-patient-registration__identifier-selection__submit___EFvNk:hover{cursor:pointer}.-esm-patient-registration__identifier-selection__cancelButton___o8f0G{width:11.688rem}.-esm-patient-registration__identifier-selection__submitButton___WRJVa{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__identifier-selection__infoGrid___lYE6f{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__identifier-selection__label01___P7jXk{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__identifier-selection__productiveHeading02___rOsRi{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__identifier-selection__space05___Y0nw4{margin:1rem 0 1rem 0}.-esm-patient-registration__identifier-selection__formContainer___isKuG{display:flex;width:100%}.-esm-patient-registration__identifier-selection__stickyColumn___SCnIQ{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__identifier-selection__touchTarget___OhMJU a:active{color:#161616}.-esm-patient-registration__identifier-selection__linkName___eS6IH{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__identifier-selection__linkName___eS6IH:active{text-decoration:none;color:#161616}.-esm-patient-registration__identifier-selection__linkName___eS6IH:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__identifier-selection__main___eLHMZ{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__identifier-selection__infoGrid___lYE6f{max-width:unset}html[dir=rtl] .-esm-patient-registration__identifier-selection__linkName___eS6IH>svg{transform:scale(-1, 1)}html[dir=rtl] .-esm-patient-registration__identifier-selection__infoGrid___lYE6f{padding-left:unset;padding-right:2rem}.-esm-patient-registration__identifier-selection__button___l3yVl{height:4rem;display:flex;align-content:flex-start;align-items:baseline;min-width:50%}.-esm-patient-registration__identifier-selection__tablet___rSdxC{padding:1.5rem 1rem;background-color:#fff}.-esm-patient-registration__identifier-selection__desktop___WlFF7{padding:0rem}.-esm-patient-registration__identifier-selection__radioGroup___WAlzM{background-color:#f4f4f4;padding:1rem}.-esm-patient-registration__identifier-selection__radioButton___vGul_{margin:0 !important}.-esm-patient-registration__identifier-selection__radioButton___vGul_ label{height:2rem}.omrs-breakpoint-lt-desktop .-esm-patient-registration__identifier-selection__radioButton___vGul_ label{height:3rem !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/patient-registration.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/patient-registration/field/id/identifier-selection.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,gEACE,kCAAA,CAGF,iEACE,WAAA,CAGF,uEACE,cAAA,CAGF,uEACE,eAAA,CAGF,uEACE,kBCUW,CDTX,eAAA,CACA,aAAA,CAGF,mEACE,UAAA,CACA,iBCaW,CDZX,kBAAA,CACA,eCCW,CAAA,eAAA,CDGb,kEEwyBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFtyBF,eCLW,CDMX,kBCNW,CDOX,aDnCM,CCsCR,8EEiyBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CF/xBF,aDxCM,CCyCN,cAAA,CAGF,kEACE,oBAAA,CAGF,wEACE,YAAA,CACA,UAAA,CAGF,uEACE,eAAA,CACA,eC3BW,CD6BX,QAAA,CAGF,+EACE,aDtDe,CCyDjB,mEACE,aD3Dc,CC4Dd,gBAAA,CACA,cCvCW,CDwCX,eAAA,CAEA,0EACE,oBAAA,CACA,aDjEa,CCoEf,yEACE,oBAAA,CACA,aDtEa,CCuEb,cAAA,CAIJ,+DACE,qBAAA,CAIA,+FACE,eAAA,CAOA,qFACE,sBAAA,CAIJ,iFACE,kBAAA,CACA,kBChES,CEtCb,iEACE,WAAA,CACA,YAAA,CACA,wBAAA,CACA,oBAAA,CACA,aAAA,CAGF,iEACE,mBAAA,CACA,qBJZM,CIeR,kEACE,YAAA,CAGF,qEACE,wBJrBM,CIsBN,YFSW,CENb,sEACE,mBAAA,CACA,4EACE,WFaS,CERX,wGACE,sBAAA",sourceRoot:""}]),o.locals={title:"-esm-patient-registration__identifier-selection__title___id4Ma",submit:"-esm-patient-registration__identifier-selection__submit___EFvNk",cancelButton:"-esm-patient-registration__identifier-selection__cancelButton___o8f0G",submitButton:"-esm-patient-registration__identifier-selection__submitButton___WRJVa",infoGrid:"-esm-patient-registration__identifier-selection__infoGrid___lYE6f",label01:"-esm-patient-registration__identifier-selection__label01___P7jXk",productiveHeading02:"-esm-patient-registration__identifier-selection__productiveHeading02___rOsRi",space05:"-esm-patient-registration__identifier-selection__space05___Y0nw4",formContainer:"-esm-patient-registration__identifier-selection__formContainer___isKuG",stickyColumn:"-esm-patient-registration__identifier-selection__stickyColumn___SCnIQ",touchTarget:"-esm-patient-registration__identifier-selection__touchTarget___OhMJU",linkName:"-esm-patient-registration__identifier-selection__linkName___eS6IH",main:"-esm-patient-registration__identifier-selection__main___eLHMZ",button:"-esm-patient-registration__identifier-selection__button___l3yVl",tablet:"-esm-patient-registration__identifier-selection__tablet___rSdxC",desktop:"-esm-patient-registration__identifier-selection__desktop___WlFF7",radioGroup:"-esm-patient-registration__identifier-selection__radioGroup___WAlzM",radioButton:"-esm-patient-registration__identifier-selection__radioButton___vGul_"};const s=o},4301:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__autosuggest__label01___ZMRhI{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-patient-registration__autosuggest__suggestions___jNk6d{position:relative;border-top-width:0;list-style:none;margin-top:0;max-height:143px;overflow-y:auto;padding-left:0;width:100%;position:absolute;left:0;background-color:#fff;margin-bottom:20px;z-index:99}.-esm-patient-registration__autosuggest__suggestions___jNk6d li{padding:1rem;line-height:1.29;color:#525252;border-bottom:1px solid #8d8d8d}.-esm-patient-registration__autosuggest__suggestions___jNk6d li:hover{background-color:#e5e5e5;color:#161616;cursor:pointer}.-esm-patient-registration__autosuggest__suggestions___jNk6d li:not(:last-of-type){border-bottom:1px solid #999}.-esm-patient-registration__autosuggest__autocomplete___CqHbh{position:relative}.-esm-patient-registration__autosuggest__autocompleteSearch___tDrC1{width:100%}.-esm-patient-registration__autosuggest__suggestions___jNk6d a{color:inherit;text-decoration:none}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/input/custom-input/autosuggest/autosuggest.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,yDCs0BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CDl0BJ,6DACE,iBAAA,CACA,kBAAA,CACA,eAAA,CACA,YAAA,CACA,gBAAA,CACA,eAAA,CACA,cAAA,CACA,UAAA,CACA,iBAAA,CACA,MAAA,CACA,qBAAA,CACA,kBAAA,CACA,UAAA,CAGF,gEACE,YEMW,CFLX,gBAAA,CACA,aAAA,CACA,+BAAA,CAGF,sEACE,wBAAA,CACA,aAAA,CACA,cAAA,CAGF,mFACE,4BAAA,CAGF,8DACE,iBAAA,CAGF,oEACE,UAAA,CAGF,+DACE,aAAA,CACA,oBAAA",sourceRoot:""}]),o.locals={label01:"-esm-patient-registration__autosuggest__label01___ZMRhI",suggestions:"-esm-patient-registration__autosuggest__suggestions___jNk6d",autocomplete:"-esm-patient-registration__autosuggest__autocomplete___CqHbh",autocompleteSearch:"-esm-patient-registration__autosuggest__autocompleteSearch___tDrC1"};const s=o},7558:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__input__title___ymmMp{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__input__submit___drScu{width:250px}.-esm-patient-registration__input__submit___drScu:hover{cursor:pointer}.-esm-patient-registration__input__cancelButton___MGlnb{width:11.688rem}.-esm-patient-registration__input__submitButton___KxHlt{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__input__infoGrid___KptwF{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__input__label01___udxOY{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__input__productiveHeading02___BviaC{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__input__space05___MSQTm{margin:1rem 0 1rem 0}.-esm-patient-registration__input__formContainer___Djtuh{display:flex;width:100%}.-esm-patient-registration__input__stickyColumn___Cqo0q{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__input__touchTarget___aKvZw a:active{color:#161616}.-esm-patient-registration__input__linkName___ePbIQ{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__input__linkName___ePbIQ:active{text-decoration:none;color:#161616}.-esm-patient-registration__input__linkName___ePbIQ:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__input__main___xrszP{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__input__infoGrid___KptwF{max-width:unset}html[dir=rtl] .-esm-patient-registration__input__linkName___ePbIQ>svg{transform:scale(-1, 1)}html[dir=rtl] .-esm-patient-registration__input__infoGrid___KptwF{padding-left:unset;padding-right:2rem}.-esm-patient-registration__input__fieldRow___vLP6O{display:flex;flex-direction:row;justify-content:flex-start;flex-wrap:wrap}.-esm-patient-registration__input__subFieldRow___sPk3F{margin-bottom:5px}.-esm-patient-registration__input__label___orNk0{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#525252}.-esm-patient-registration__input__textID___Ubh9Y,.-esm-patient-registration__input__comboInput___qUhJm{margin-bottom:1rem}.-esm-patient-registration__input__requiredField___k3345{color:#da1e28}.-esm-patient-registration__input__input___Dwmo5{margin-right:5px}.-esm-patient-registration__input__checkboxField___OEvPy{display:flex;flex-direction:row;justify-content:flex-start;width:400px;margin-left:10px}.-esm-patient-registration__input__textInput___hQZXv{width:250px !important;height:40px !important}.-esm-patient-registration__input__numberInput___SAa3l{width:200px !important;height:40px !important}.-esm-patient-registration__input__checkboxInput___oso9t{height:1.5rem !important;width:1.5rem !important;margin-top:8px}.-esm-patient-registration__input__selectInput___lV71G{width:150px !important;height:40px !important}.-esm-patient-registration__input__dateInput___KyGaB{width:200px !important;height:40px !important;font-size:large !important}.-esm-patient-registration__input__telInput___DwqWm{width:250px !important;height:40px !important}.-esm-patient-registration__input__errorInput___Xyttp{border:2px solid #da1e28 !important;padding-left:.875rem !important}.-esm-patient-registration__input__errorMessage___LkLY3{color:#da1e28;align-self:center}.-esm-patient-registration__input__dummyData___lR2jV{cursor:pointer;margin-left:5px}.-esm-patient-registration__input__IDInput___NYnrx{display:grid;grid-template-columns:1fr auto;align-items:end}.-esm-patient-registration__input__trashCan___T3t2n{color:#da1e28}.omrs-breakpoint-lt-desktop .-esm-patient-registration__input__IDInput___NYnrx{max-width:unset;width:100%}.-esm-patient-registration__input__dangerLabel01___C3QkA{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:#da1e28}.-esm-patient-registration__input__comboInputEntries___Xg2qG{position:relative}.-esm-patient-registration__input__comboInputItemOption___Uv8Ip{margin:0;padding-left:1rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/patient-registration.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/patient-registration/input/input.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,iDACE,kCAAA,CAGF,kDACE,WAAA,CAGF,wDACE,cAAA,CAGF,wDACE,eAAA,CAGF,wDACE,kBCUW,CDTX,eAAA,CACA,aAAA,CAGF,oDACE,UAAA,CACA,iBCaW,CDZX,kBAAA,CACA,eCCW,CAAA,eAAA,CDGb,mDEwyBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFtyBF,eCLW,CDMX,kBCNW,CDOX,aDnCM,CCsCR,+DEiyBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CF/xBF,aDxCM,CCyCN,cAAA,CAGF,mDACE,oBAAA,CAGF,yDACE,YAAA,CACA,UAAA,CAGF,wDACE,eAAA,CACA,eC3BW,CD6BX,QAAA,CAGF,gEACE,aDtDe,CCyDjB,oDACE,aD3Dc,CC4Dd,gBAAA,CACA,cCvCW,CDwCX,eAAA,CAEA,2DACE,oBAAA,CACA,aDjEa,CCoEf,0DACE,oBAAA,CACA,aDtEa,CCuEb,cAAA,CAIJ,gDACE,qBAAA,CAIA,gFACE,eAAA,CAOA,sEACE,sBAAA,CAIJ,kEACE,kBAAA,CACA,kBChES,CErCb,oDACE,YAAA,CACA,kBAAA,CACA,0BAAA,CACA,cAAA,CAGF,uDACE,iBAAA,CAGF,iDD2zBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CCzzBF,aJZQ,CIeV,wGAEE,kBFSW,CENb,yDACE,aJNO,CIST,iDACE,gBAAA,CAGF,yDACE,YAAA,CACA,kBAAA,CACA,0BAAA,CACA,WAAA,CACA,gBAAA,CAGF,qDACE,sBAAA,CACA,sBAAA,CAGF,uDACE,sBAAA,CACA,sBAAA,CAGF,yDACE,wBAAA,CACA,uBAAA,CACA,cAAA,CAGF,uDACE,sBAAA,CACA,sBAAA,CAGF,qDACE,sBAAA,CACA,sBAAA,CACA,0BAAA,CAGF,oDACE,sBAAA,CACA,sBAAA,CAGF,sDACE,mCAAA,CACA,+BAAA,CAGF,wDACE,aJ3DO,CI4DP,iBAAA,CAGF,qDACE,cAAA,CACA,eAAA,CAGF,mDACE,YAAA,CACA,8BAAA,CACA,eAAA,CAGF,oDACE,aJ3EO,CI+EP,+EACE,eAAA,CACA,UAAA,CAIJ,yDDiuBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CC/tBF,aJvFO,CI0FT,6DACE,iBAAA,CAGF,gEACE,QAAA,CACA,iBAAA",sourceRoot:""}]),o.locals={title:"-esm-patient-registration__input__title___ymmMp",submit:"-esm-patient-registration__input__submit___drScu",cancelButton:"-esm-patient-registration__input__cancelButton___MGlnb",submitButton:"-esm-patient-registration__input__submitButton___KxHlt",infoGrid:"-esm-patient-registration__input__infoGrid___KptwF",label01:"-esm-patient-registration__input__label01___udxOY",productiveHeading02:"-esm-patient-registration__input__productiveHeading02___BviaC",space05:"-esm-patient-registration__input__space05___MSQTm",formContainer:"-esm-patient-registration__input__formContainer___Djtuh",stickyColumn:"-esm-patient-registration__input__stickyColumn___Cqo0q",touchTarget:"-esm-patient-registration__input__touchTarget___aKvZw",linkName:"-esm-patient-registration__input__linkName___ePbIQ",main:"-esm-patient-registration__input__main___xrszP",fieldRow:"-esm-patient-registration__input__fieldRow___vLP6O",subFieldRow:"-esm-patient-registration__input__subFieldRow___sPk3F",label:"-esm-patient-registration__input__label___orNk0",textID:"-esm-patient-registration__input__textID___Ubh9Y",comboInput:"-esm-patient-registration__input__comboInput___qUhJm",requiredField:"-esm-patient-registration__input__requiredField___k3345",input:"-esm-patient-registration__input__input___Dwmo5",checkboxField:"-esm-patient-registration__input__checkboxField___OEvPy",textInput:"-esm-patient-registration__input__textInput___hQZXv",numberInput:"-esm-patient-registration__input__numberInput___SAa3l",checkboxInput:"-esm-patient-registration__input__checkboxInput___oso9t",selectInput:"-esm-patient-registration__input__selectInput___lV71G",dateInput:"-esm-patient-registration__input__dateInput___KyGaB",telInput:"-esm-patient-registration__input__telInput___DwqWm",errorInput:"-esm-patient-registration__input__errorInput___Xyttp",errorMessage:"-esm-patient-registration__input__errorMessage___LkLY3",dummyData:"-esm-patient-registration__input__dummyData___lR2jV",IDInput:"-esm-patient-registration__input__IDInput___NYnrx",trashCan:"-esm-patient-registration__input__trashCan___T3t2n",dangerLabel01:"-esm-patient-registration__input__dangerLabel01___C3QkA",comboInputEntries:"-esm-patient-registration__input__comboInputEntries___Xg2qG",comboInputItemOption:"-esm-patient-registration__input__comboInputItemOption___Uv8Ip"};const s=o},6039:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__patient-registration__title___deVt0{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__patient-registration__submit___WAvMe{width:250px}.-esm-patient-registration__patient-registration__submit___WAvMe:hover{cursor:pointer}.-esm-patient-registration__patient-registration__cancelButton___d1bxd{width:11.688rem}.-esm-patient-registration__patient-registration__submitButton___FPRJM{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__patient-registration__infoGrid___GbkQI{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__patient-registration__label01___wbzrK{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__patient-registration__productiveHeading02___VG2Xd{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__patient-registration__space05___kujPI{margin:1rem 0 1rem 0}.-esm-patient-registration__patient-registration__formContainer___R8NXh{display:flex;width:100%}.-esm-patient-registration__patient-registration__stickyColumn___YyTJX{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__patient-registration__touchTarget___J2DcK a:active{color:#161616}.-esm-patient-registration__patient-registration__linkName___R5ijn{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__patient-registration__linkName___R5ijn:active{text-decoration:none;color:#161616}.-esm-patient-registration__patient-registration__linkName___R5ijn:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__patient-registration__main___pAibL{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__patient-registration__infoGrid___GbkQI{max-width:unset}html[dir=rtl] .-esm-patient-registration__patient-registration__linkName___R5ijn>svg{transform:scale(-1, 1)}html[dir=rtl] .-esm-patient-registration__patient-registration__infoGrid___GbkQI{padding-left:unset;padding-right:2rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/patient-registration.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,gEACE,kCAAA,CAGF,iEACE,WAAA,CAGF,uEACE,cAAA,CAGF,uEACE,eAAA,CAGF,uEACE,kBCUW,CDTX,eAAA,CACA,aAAA,CAGF,mEACE,UAAA,CACA,iBCaW,CDZX,kBAAA,CACA,eCCW,CAAA,eAAA,CDGb,kEEwyBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFtyBF,eCLW,CDMX,kBCNW,CDOX,aDnCM,CCsCR,8EEiyBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CF/xBF,aDxCM,CCyCN,cAAA,CAGF,kEACE,oBAAA,CAGF,wEACE,YAAA,CACA,UAAA,CAGF,uEACE,eAAA,CACA,eC3BW,CD6BX,QAAA,CAGF,+EACE,aDtDe,CCyDjB,mEACE,aD3Dc,CC4Dd,gBAAA,CACA,cCvCW,CDwCX,eAAA,CAEA,0EACE,oBAAA,CACA,aDjEa,CCoEf,yEACE,oBAAA,CACA,aDtEa,CCuEb,cAAA,CAIJ,+DACE,qBAAA,CAIA,+FACE,eAAA,CAOA,qFACE,sBAAA,CAIJ,iFACE,kBAAA,CACA,kBChES",sourceRoot:""}]),o.locals={title:"-esm-patient-registration__patient-registration__title___deVt0",submit:"-esm-patient-registration__patient-registration__submit___WAvMe",cancelButton:"-esm-patient-registration__patient-registration__cancelButton___d1bxd",submitButton:"-esm-patient-registration__patient-registration__submitButton___FPRJM",infoGrid:"-esm-patient-registration__patient-registration__infoGrid___GbkQI",label01:"-esm-patient-registration__patient-registration__label01___wbzrK",productiveHeading02:"-esm-patient-registration__patient-registration__productiveHeading02___VG2Xd",space05:"-esm-patient-registration__patient-registration__space05___kujPI",formContainer:"-esm-patient-registration__patient-registration__formContainer___R8NXh",stickyColumn:"-esm-patient-registration__patient-registration__stickyColumn___YyTJX",touchTarget:"-esm-patient-registration__patient-registration__touchTarget___J2DcK",linkName:"-esm-patient-registration__patient-registration__linkName___R5ijn",main:"-esm-patient-registration__patient-registration__main___pAibL"};const s=o},2429:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__relationships__title___VwsTO{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__relationships__submit___XKnWx{width:250px}.-esm-patient-registration__relationships__submit___XKnWx:hover{cursor:pointer}.-esm-patient-registration__relationships__cancelButton___BQuUm{width:11.688rem}.-esm-patient-registration__relationships__submitButton___Tg9V7{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__relationships__infoGrid___SAUPw{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__relationships__label01___pH0BA{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__relationships__productiveHeading02___BjxK9{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__relationships__space05___cMUhT{margin:1rem 0 1rem 0}.-esm-patient-registration__relationships__formContainer___fk4C8{display:flex;width:100%}.-esm-patient-registration__relationships__stickyColumn___hS_Eh{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__relationships__touchTarget___PbOAv a:active{color:#161616}.-esm-patient-registration__relationships__linkName___QK15g{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__relationships__linkName___QK15g:active{text-decoration:none;color:#161616}.-esm-patient-registration__relationships__linkName___QK15g:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__relationships__main___kTcJj{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__relationships__infoGrid___SAUPw{max-width:unset}html[dir=rtl] .-esm-patient-registration__relationships__linkName___QK15g>svg{transform:scale(-1, 1)}html[dir=rtl] .-esm-patient-registration__relationships__infoGrid___SAUPw{padding-left:unset;padding-right:2rem}.-esm-patient-registration__relationships__labelText___uj7UC{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px)}.-esm-patient-registration__relationships__bodyShort02___lfKTT{font-size:var(--cds-body-compact-02-font-size, 1rem);font-weight:var(--cds-body-compact-02-font-weight, 400);line-height:var(--cds-body-compact-02-line-height, 1.375);letter-spacing:var(--cds-body-compact-02-letter-spacing, 0)}.-esm-patient-registration__relationships__searchBox___sm1h1{margin-bottom:1rem}.-esm-patient-registration__relationships__relationshipHeader____GJQK{display:flex;align-items:center}.-esm-patient-registration__relationships__productiveHeading___kksGB{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#525252}.-esm-patient-registration__relationships__trashCan___RUDnn{color:#da1e28 !important}.omrs-breakpoint-lt-desktop .-esm-patient-registration__relationships__relationshipHeader____GJQK{justify-content:space-between}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/patient-registration.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/patient-registration/section/patient-relationships/relationships.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,yDACE,kCAAA,CAGF,0DACE,WAAA,CAGF,gEACE,cAAA,CAGF,gEACE,eAAA,CAGF,gEACE,kBCUW,CDTX,eAAA,CACA,aAAA,CAGF,4DACE,UAAA,CACA,iBCaW,CDZX,kBAAA,CACA,eCCW,CAAA,eAAA,CDGb,2DEwyBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFtyBF,eCLW,CDMX,kBCNW,CDOX,aDnCM,CCsCR,uEEiyBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CF/xBF,aDxCM,CCyCN,cAAA,CAGF,2DACE,oBAAA,CAGF,iEACE,YAAA,CACA,UAAA,CAGF,gEACE,eAAA,CACA,eC3BW,CD6BX,QAAA,CAGF,wEACE,aDtDe,CCyDjB,4DACE,aD3Dc,CC4Dd,gBAAA,CACA,cCvCW,CDwCX,eAAA,CAEA,mEACE,oBAAA,CACA,aDjEa,CCoEf,kEACE,oBAAA,CACA,aDtEa,CCuEb,cAAA,CAIJ,wDACE,qBAAA,CAIA,wFACE,eAAA,CAOA,8EACE,sBAAA,CAIJ,0EACE,kBAAA,CACA,kBChES,CErCb,6DDs0BI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CCl0BJ,+DDk0BI,oDAAA,CAAA,uDAAA,CAAA,yDAAA,CAAA,2DAAA,CC9zBJ,6DACE,kBFkBW,CEfb,sEACE,YAAA,CACA,kBAAA,CAGF,qEDqzBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CCnzBF,aJlBQ,CIqBV,4DACE,wBAAA,CAIA,kGACE,6BAAA",sourceRoot:""}]),o.locals={title:"-esm-patient-registration__relationships__title___VwsTO",submit:"-esm-patient-registration__relationships__submit___XKnWx",cancelButton:"-esm-patient-registration__relationships__cancelButton___BQuUm",submitButton:"-esm-patient-registration__relationships__submitButton___Tg9V7",infoGrid:"-esm-patient-registration__relationships__infoGrid___SAUPw",label01:"-esm-patient-registration__relationships__label01___pH0BA",productiveHeading02:"-esm-patient-registration__relationships__productiveHeading02___BjxK9",space05:"-esm-patient-registration__relationships__space05___cMUhT",formContainer:"-esm-patient-registration__relationships__formContainer___fk4C8",stickyColumn:"-esm-patient-registration__relationships__stickyColumn___hS_Eh",touchTarget:"-esm-patient-registration__relationships__touchTarget___PbOAv",linkName:"-esm-patient-registration__relationships__linkName___QK15g",main:"-esm-patient-registration__relationships__main___kTcJj",labelText:"-esm-patient-registration__relationships__labelText___uj7UC",bodyShort02:"-esm-patient-registration__relationships__bodyShort02___lfKTT",searchBox:"-esm-patient-registration__relationships__searchBox___sm1h1",relationshipHeader:"-esm-patient-registration__relationships__relationshipHeader____GJQK",productiveHeading:"-esm-patient-registration__relationships__productiveHeading___kksGB",trashCan:"-esm-patient-registration__relationships__trashCan___RUDnn"};const s=o},713:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__section__title___t5kfW{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__section__submit___deOxc{width:250px}.-esm-patient-registration__section__submit___deOxc:hover{cursor:pointer}.-esm-patient-registration__section__cancelButton___WL_ze{width:11.688rem}.-esm-patient-registration__section__submitButton___LIciE{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__section__infoGrid___pWQZT{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__section__label01___zyKRq{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__section__productiveHeading02____1hxG{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__section__space05___lREpo{margin:1rem 0 1rem 0}.-esm-patient-registration__section__formContainer___SRjjl{display:flex;width:100%}.-esm-patient-registration__section__stickyColumn___a3FUs{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__section__touchTarget___Eb0y6 a:active{color:#161616}.-esm-patient-registration__section__linkName___u7Bhd{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__section__linkName___u7Bhd:active{text-decoration:none;color:#161616}.-esm-patient-registration__section__linkName___u7Bhd:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__section__main___yCaDW{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__section__infoGrid___pWQZT{max-width:unset}html[dir=rtl] .-esm-patient-registration__section__linkName___u7Bhd>svg{transform:scale(-1, 1)}html[dir=rtl] .-esm-patient-registration__section__infoGrid___pWQZT{padding-left:unset;padding-right:2rem}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/patient-registration.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,mDACE,kCAAA,CAGF,oDACE,WAAA,CAGF,0DACE,cAAA,CAGF,0DACE,eAAA,CAGF,0DACE,kBCUW,CDTX,eAAA,CACA,aAAA,CAGF,sDACE,UAAA,CACA,iBCaW,CDZX,kBAAA,CACA,eCCW,CAAA,eAAA,CDGb,qDEwyBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFtyBF,eCLW,CDMX,kBCNW,CDOX,aDnCM,CCsCR,iEEiyBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CF/xBF,aDxCM,CCyCN,cAAA,CAGF,qDACE,oBAAA,CAGF,2DACE,YAAA,CACA,UAAA,CAGF,0DACE,eAAA,CACA,eC3BW,CD6BX,QAAA,CAGF,kEACE,aDtDe,CCyDjB,sDACE,aD3Dc,CC4Dd,gBAAA,CACA,cCvCW,CDwCX,eAAA,CAEA,6DACE,oBAAA,CACA,aDjEa,CCoEf,4DACE,oBAAA,CACA,aDtEa,CCuEb,cAAA,CAIJ,kDACE,qBAAA,CAIA,kFACE,eAAA,CAOA,wEACE,sBAAA,CAIJ,oEACE,kBAAA,CACA,kBChES",sourceRoot:""}]),o.locals={title:"-esm-patient-registration__section__title___t5kfW",submit:"-esm-patient-registration__section__submit___deOxc",cancelButton:"-esm-patient-registration__section__cancelButton___WL_ze",submitButton:"-esm-patient-registration__section__submitButton___LIciE",infoGrid:"-esm-patient-registration__section__infoGrid___pWQZT",label01:"-esm-patient-registration__section__label01___zyKRq",productiveHeading02:"-esm-patient-registration__section__productiveHeading02____1hxG",space05:"-esm-patient-registration__section__space05___lREpo",formContainer:"-esm-patient-registration__section__formContainer___SRjjl",stickyColumn:"-esm-patient-registration__section__stickyColumn___a3FUs",touchTarget:"-esm-patient-registration__section__touchTarget___Eb0y6",linkName:"-esm-patient-registration__section__linkName___u7Bhd",main:"-esm-patient-registration__section__main___yCaDW"};const s=o},4102:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__overlay__title____YPY_{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__overlay__submit___zc6Wb{width:250px}.-esm-patient-registration__overlay__submit___zc6Wb:hover{cursor:pointer}.-esm-patient-registration__overlay__cancelButton___h860H{width:11.688rem}.-esm-patient-registration__overlay__submitButton___xvgAH{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__overlay__infoGrid___LpFZH{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__overlay__label01___YrbZe{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__overlay__productiveHeading02___sQ1wt{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__overlay__space05___qxgdq{margin:1rem 0 1rem 0}.-esm-patient-registration__overlay__formContainer___mqmN0{display:flex;width:100%}.-esm-patient-registration__overlay__stickyColumn___BR29p{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__overlay__touchTarget___tGlGl a:active{color:#161616}.-esm-patient-registration__overlay__linkName___NTGfr{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__overlay__linkName___NTGfr:active{text-decoration:none;color:#161616}.-esm-patient-registration__overlay__linkName___NTGfr:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__overlay__main___MOTWA{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__overlay__infoGrid___LpFZH{max-width:unset}html[dir=rtl] .-esm-patient-registration__overlay__linkName___NTGfr>svg{transform:scale(-1, 1)}html[dir=rtl] .-esm-patient-registration__overlay__infoGrid___LpFZH{padding-left:unset;padding-right:2rem}.-esm-patient-registration__overlay__desktopOverlay___d3zF6{position:fixed;top:3rem;right:0;height:calc(100vh - 3rem);min-width:27rem;background-color:#fff;border-left:1px solid #a8a8a8;overflow:hidden;display:grid;grid-template-rows:auto 1fr auto;z-index:999}.-esm-patient-registration__overlay__tabletOverlay___JSgzT{position:fixed;top:0;bottom:0;left:0;right:0;z-index:9999;background-color:#fff;overflow:hidden;padding-top:3rem;display:grid;grid-template-rows:1fr auto}.-esm-patient-registration__overlay__tabletOverlayHeader___HKDSr button{background-color:#005d5d !important}.-esm-patient-registration__overlay__tabletOverlayHeader___HKDSr .-esm-patient-registration__overlay__headerContent___E79in{color:#fff}.-esm-patient-registration__overlay__desktopHeader___D56AB{display:flex;justify-content:space-between;align-items:center;background-color:#e0e0e0;border-bottom:1px solid #a8a8a8}.-esm-patient-registration__overlay__headerContent___E79in{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);padding:0 1rem;color:#161616}.-esm-patient-registration__overlay__closeButton___jwVf9{background-color:#fff}.-esm-patient-registration__overlay__overlayContent___FVBjG{padding:1rem;overflow-y:auto}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/patient-registration.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/patient-registration/ui-components/overlay/overlay.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,mDACE,kCAAA,CAGF,oDACE,WAAA,CAGF,0DACE,cAAA,CAGF,0DACE,eAAA,CAGF,0DACE,kBCUW,CDTX,eAAA,CACA,aAAA,CAGF,sDACE,UAAA,CACA,iBCaW,CDZX,kBAAA,CACA,eCCW,CAAA,eAAA,CDGb,qDEwyBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFtyBF,eCLW,CDMX,kBCNW,CDOX,aDnCM,CCsCR,iEEiyBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CF/xBF,aDxCM,CCyCN,cAAA,CAGF,qDACE,oBAAA,CAGF,2DACE,YAAA,CACA,UAAA,CAGF,0DACE,eAAA,CACA,eC3BW,CD6BX,QAAA,CAGF,kEACE,aDtDe,CCyDjB,sDACE,aD3Dc,CC4Dd,gBAAA,CACA,cCvCW,CDwCX,eAAA,CAEA,6DACE,oBAAA,CACA,aDjEa,CCoEf,4DACE,oBAAA,CACA,aDtEa,CCuEb,cAAA,CAIJ,kDACE,qBAAA,CAIA,kFACE,eAAA,CAOA,wEACE,sBAAA,CAIJ,oEACE,kBAAA,CACA,kBChES,CErCb,4DACE,cAAA,CACA,QF6CW,CE5CX,OAAA,CACA,yBAAA,CACA,eAAA,CACA,qBJTM,CIUN,6BAAA,CACA,eAAA,CACA,YAAA,CACA,gCAAA,CACA,WAAA,CAGF,2DACE,cAAA,CACA,KAAA,CACA,QAAA,CACA,MAAA,CACA,OAAA,CACA,YAAA,CACA,qBJxBM,CIyBN,eAAA,CACA,gBFwBW,CEvBX,YAAA,CACA,2BAAA,CAIA,wEACE,mCAAA,CAEF,4HACE,UJpCI,CIwCR,2DACE,YAAA,CACA,6BAAA,CACA,kBAAA,CACA,wBJ3CM,CI4CN,+BAAA,CAGF,2DDyxBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CCvxBF,cAAA,CACA,aJhDM,CImDR,yDACE,qBJvDM,CI0DR,4DACE,YF7BW,CE8BX,eAAA",sourceRoot:""}]),o.locals={title:"-esm-patient-registration__overlay__title____YPY_",submit:"-esm-patient-registration__overlay__submit___zc6Wb",cancelButton:"-esm-patient-registration__overlay__cancelButton___h860H",submitButton:"-esm-patient-registration__overlay__submitButton___xvgAH",infoGrid:"-esm-patient-registration__overlay__infoGrid___LpFZH",label01:"-esm-patient-registration__overlay__label01___YrbZe",productiveHeading02:"-esm-patient-registration__overlay__productiveHeading02___sQ1wt",space05:"-esm-patient-registration__overlay__space05___qxgdq",formContainer:"-esm-patient-registration__overlay__formContainer___mqmN0",stickyColumn:"-esm-patient-registration__overlay__stickyColumn___BR29p",touchTarget:"-esm-patient-registration__overlay__touchTarget___tGlGl",linkName:"-esm-patient-registration__overlay__linkName___NTGfr",main:"-esm-patient-registration__overlay__main___MOTWA",desktopOverlay:"-esm-patient-registration__overlay__desktopOverlay___d3zF6",tabletOverlay:"-esm-patient-registration__overlay__tabletOverlay___JSgzT",tabletOverlayHeader:"-esm-patient-registration__overlay__tabletOverlayHeader___HKDSr",headerContent:"-esm-patient-registration__overlay__headerContent___E79in",desktopHeader:"-esm-patient-registration__overlay__desktopHeader___D56AB",closeButton:"-esm-patient-registration__overlay__closeButton___jwVf9",overlayContent:"-esm-patient-registration__overlay__overlayContent___FVBjG"};const s=o},8928:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-patient-registration__patient-verification__title___FpuaQ{color:var(--omrs-color-brand-teal)}.-esm-patient-registration__patient-verification__submit___SLswF{width:250px}.-esm-patient-registration__patient-verification__submit___SLswF:hover{cursor:pointer}.-esm-patient-registration__patient-verification__cancelButton___RXj9P{width:11.688rem}.-esm-patient-registration__patient-verification__submitButton___Oy620{margin-bottom:1rem;width:11.688rem;display:block}.-esm-patient-registration__patient-verification__infoGrid___nnX3H{width:100%;padding-left:2rem;margin-bottom:40vh;margin-top:1rem;max-width:50rem}.-esm-patient-registration__patient-verification__label01___egrNc{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);margin-top:1rem;margin-bottom:1rem;color:#8d8d8d}.-esm-patient-registration__patient-verification__productiveHeading02___Vktw7{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0);color:#8d8d8d;cursor:pointer}.-esm-patient-registration__patient-verification__space05___JNnZ3{margin:1rem 0 1rem 0}.-esm-patient-registration__patient-verification__formContainer___rhAxH{display:flex;width:100%}.-esm-patient-registration__patient-verification__stickyColumn___uau9B{position:sticky;margin-top:1rem;top:4rem}.-esm-patient-registration__patient-verification__touchTarget___VKIUW a:active{color:#161616}.-esm-patient-registration__patient-verification__linkName___TOGpb{color:#525252;line-height:1.38;font-size:1rem;font-weight:600}.-esm-patient-registration__patient-verification__linkName___TOGpb:active{text-decoration:none;color:#161616}.-esm-patient-registration__patient-verification__linkName___TOGpb:hover{text-decoration:none;color:#161616;cursor:pointer}.-esm-patient-registration__patient-verification__main___ajuiO{background-color:#fff}.omrs-breakpoint-lt-desktop .-esm-patient-registration__patient-verification__infoGrid___nnX3H{max-width:unset}html[dir=rtl] .-esm-patient-registration__patient-verification__linkName___TOGpb>svg{transform:scale(-1, 1)}html[dir=rtl] .-esm-patient-registration__patient-verification__infoGrid___nnX3H{padding-left:unset;padding-right:2rem}.omrs-breakpoint-gt-tablet .-esm-patient-registration__patient-verification__verificationWrapper___s93qh{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;column-gap:.325rem;align-items:flex-end}.omrs-breakpoint-lt-desktop .-esm-patient-registration__patient-verification__verificationWrapper___s93qh{row-gap:.5rem;display:flex;flex-direction:column}.-esm-patient-registration__patient-verification__errorWrapper___ufQm1{color:#fa4d56;margin:0 0 1rem 0;display:flex;justify-content:center;align-items:center}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/patient-registration/patient-registration.scss","webpack://./../../node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./../../node_modules/@carbon/type/scss/_styles.scss","webpack://./src/patient-verification/patient-verification.scss","webpack://./../../node_modules/@carbon/colors/index.scss"],names:[],mappings:"AAoDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CCnDF,gEACE,kCAAA,CAGF,iEACE,WAAA,CAGF,uEACE,cAAA,CAGF,uEACE,eAAA,CAGF,uEACE,kBCUW,CDTX,eAAA,CACA,aAAA,CAGF,mEACE,UAAA,CACA,iBCaW,CDZX,kBAAA,CACA,eCCW,CAAA,eAAA,CDGb,kEEwyBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFtyBF,eCLW,CDMX,kBCNW,CDOX,aDnCM,CCsCR,8EEiyBI,uDAAA,CAAA,0DAAA,CAAA,4DAAA,CAAA,8DAAA,CF/xBF,aDxCM,CCyCN,cAAA,CAGF,kEACE,oBAAA,CAGF,wEACE,YAAA,CACA,UAAA,CAGF,uEACE,eAAA,CACA,eC3BW,CD6BX,QAAA,CAGF,+EACE,aDtDe,CCyDjB,mEACE,aD3Dc,CC4Dd,gBAAA,CACA,cCvCW,CDwCX,eAAA,CAEA,0EACE,oBAAA,CACA,aDjEa,CCoEf,yEACE,oBAAA,CACA,aDtEa,CCuEb,cAAA,CAIJ,+DACE,qBAAA,CAIA,+FACE,eAAA,CAOA,qFACE,sBAAA,CAIJ,iFACE,kBAAA,CACA,kBChES,CEpCX,yGACE,YAAA,CACA,qCAAA,CACA,kBAAA,CACA,oBAAA,CAMF,0GACE,aAAA,CACA,YAAA,CACA,qBAAA,CAKJ,uEACE,aCwEO,CDvEP,iBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA",sourceRoot:""}]),o.locals={title:"-esm-patient-registration__patient-verification__title___FpuaQ",submit:"-esm-patient-registration__patient-verification__submit___SLswF",cancelButton:"-esm-patient-registration__patient-verification__cancelButton___RXj9P",submitButton:"-esm-patient-registration__patient-verification__submitButton___Oy620",infoGrid:"-esm-patient-registration__patient-verification__infoGrid___nnX3H",label01:"-esm-patient-registration__patient-verification__label01___egrNc",productiveHeading02:"-esm-patient-registration__patient-verification__productiveHeading02___Vktw7",space05:"-esm-patient-registration__patient-verification__space05___JNnZ3",formContainer:"-esm-patient-registration__patient-verification__formContainer___rhAxH",stickyColumn:"-esm-patient-registration__patient-verification__stickyColumn___uau9B",touchTarget:"-esm-patient-registration__patient-verification__touchTarget___VKIUW",linkName:"-esm-patient-registration__patient-verification__linkName___TOGpb",main:"-esm-patient-registration__patient-verification__main___ajuiO",verificationWrapper:"-esm-patient-registration__patient-verification__verificationWrapper___s93qh",errorWrapper:"-esm-patient-registration__patient-verification__errorWrapper___ufQm1"};const s=o},1234:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(272),i=n.n(r),a=n(2609),o=n.n(a)()(i());o.push([e.id,".-esm-patient-registration__root__root___ZqEMk{background-color:#fff}.-esm-patient-registration__root__grid___Bq7KW{grid-template-columns:repeat(1, minmax(0, 1fr))}","",{version:3,sources:["webpack://./src/root.scss"],names:[],mappings:"AAAA,+CACE,qBAAA,CAGF,+CACE,+CAAA",sourceRoot:""}]),o.locals={root:"-esm-patient-registration__root__root___ZqEMk",grid:"-esm-patient-registration__root__grid___Bq7KW"};const s=o},4980:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Qn});var r=n(268),i=n.n(r),a=n(8744),o=n(1520),s=n(2870),l=n(6279),c=n(3076),u=n(781),A=n(37),d=n(4924),_=n(898),m=n(2113),p=n(4519),f=n.n(p),g=m.Ry({givenName:m.Z_().required("givenNameRequired"),familyName:m.Z_().required("familyNameRequired"),additionalGivenName:m.Z_().when("addNameInLocalLanguage",{is:!0,then:m.Z_().required("givenNameRequired"),otherwise:m.Z_().notRequired()}),additionalFamilyName:m.Z_().when("addNameInLocalLanguage",{is:!0,then:m.Z_().required("familyNameRequired"),otherwise:m.Z_().notRequired()}),gender:m.Z_().oneOf(["Male","Female","Other","Unknown"],"genderUnspecified").required("genderRequired"),birthdate:m.hT().when("birthdateEstimated",{is:!1,then:m.hT().required("birthdayRequired").max(Date(),"birthdayNotInTheFuture").nullable(),otherwise:m.hT().nullable()}),yearsEstimated:m.Rx().when("birthdateEstimated",{is:!0,then:m.Rx().required("yearsEstimateRequired").min(0,"negativeYears"),otherwise:m.Rx().nullable()}),monthsEstimated:m.Rx().min(0,"negativeMonths"),deathDate:m.hT().max(Date(),"deathdayNotInTheFuture").nullable(),email:m.Z_().optional().email("invalidEmail"),identifiers:m.Vo((function(e){return m.Ry(f()(e,(function(){return m.Ry({required:m.Xg(),identifierValue:m.Z_().when("required",{is:!0,then:m.Z_().required("identifierValueRequired"),otherwise:m.Z_().notRequired()})})})))}))}),C=(0,r.createContext)(void 0),h=n(7117),b=n(6804),v=n(2124),y=n.n(v),E=n(1583),w=n.n(E),D=n(7378),k=n.n(D),B=n(5993),O=n.n(B),x=n(4154),F=n.n(x),S=n(8141),T=n.n(S),I=n(7558),N={};N.styleTagTransform=T(),N.setAttributes=O(),N.insert=k().bind(null,"head"),N.domAPI=w(),N.insertStyleElement=F(),y()(I.Z,N);const j=I.Z&&I.Z.locals?I.Z.locals:void 0;var P={patientUuid:(0,b.Z)(),givenName:"John",middleName:"",familyName:"Smith",additionalGivenName:"Joey",additionalMiddleName:"",additionalFamilyName:"Smitty",addNameInLocalLanguage:!0,gender:"Male",birthdate:new Date(2020,1,1),yearsEstimated:1,monthsEstimated:2,birthdateEstimated:!0,telephoneNumber:"0800001066",isDead:!1,deathDate:"",deathCause:"",relationships:[],address:{address1:"Bom Jesus Street",address2:"",cityVillage:"Recife",stateProvince:"Pernambuco",country:"Brazil",postalCode:"50030-310"},identifiers:{}},G=function(e){var t=e.setValues;return i().createElement("main",null,i().createElement("button",{onClick:function(){return t(P)},className:"omrs-btn omrs-filled-neutral ".concat(j.dummyData),type:"button","aria-label":"Dummy Data Input"},"Input Dummy Data"))},L=n(2777),U=n(1140);function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){W(e,t,n[t])}))}return e}function q(){window.history.back()}function Z(e){var t,n={},r=null===(t=e.address)||void 0===t?void 0:t[0];if(r){var i=!0,a=!1,o=void 0;try{for(var s,l=Object.keys(r)[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var c=s.value;switch(c){case"city":n.cityVillage=r[c];break;case"state":n.stateProvince=r[c];break;case"district":n.countyDistrict=r[c];break;case"extension":r[c].forEach((function(e){e.extension.forEach((function(e){n[e.url.split("#")[1]]=e.valueString}))}));break;default:"country"!==c&&"postalCode"!==c||(n[c]=r[c])}}}catch(e){a=!0,o=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}}return n}var z=n(2228),V=n(3255),H=n(8179),Y=n(6275),X=n(3565),J=n.n(X);function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){K(a,r,i,o,s,"next",e)}function s(e){K(a,r,i,o,s,"throw",e)}o(void 0)}))}}function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ee(e,t,n[t])}))}return e}function ne(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||ae(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e){return function(e){if(Array.isArray(e))return Q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ae(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}var oe=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};function se(e){return le.apply(this,arguments)}function le(){return(le=$((function(e){return oe(this,(function(t){switch(t.label){case 0:return[4,(0,s.getSynchronizationItems)(H.Kt)];case 1:return[2,t.sent().find((function(t){return t._patientRegistrationData.formValues.patientUuid===e}))]}}))}))).apply(this,arguments)}function ce(e){var t=!!e,n=(0,V.ZP)(t?"/ws/rest/v1/person/".concat(e,"/attribute?v=custom:(uuid,display,attributeType:(uuid,display,format),value)"):null,s.openmrsFetch),i=n.data,a=n.error,o=n.isLoading,l=(0,r.useMemo)((function(){var e;return{data:null==i||null===(e=i.data)||void 0===e?void 0:e.results,isLoading:o}}),[i,a]);return l}var ue=n(225),Ae=n(6039),de={};de.styleTagTransform=T(),de.setAttributes=O(),de.insert=k().bind(null,"head"),de.domAPI=w(),de.insertStyleElement=F(),y()(Ae.Z,de);const _e=Ae.Z&&Ae.Z.locals?Ae.Z.locals:void 0;function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pe(){return pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pe.apply(this,arguments)}var fe=function(e){var t,n,a=e.checkWarning,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["checkWarning"]),l=(t=(0,_.U$)(s.name),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1],A=(0,d.useTranslation)().t,m=c.value||"",p=u.error&&A(u.error),f=(0,r.useMemo)((function(){if(!p&&"function"==typeof a){var e=a(m);return e&&A(e)}}),[a,p,m,A]),g=s.required?s.labelText:"".concat(s.labelText," (").concat(A("optional","optional"),")");return i().createElement("div",{style:{marginBottom:"1rem"}},i().createElement(o.mh4,null,i().createElement(o.oil,pe({},s,c,{labelText:g,invalid:!(!u.touched||!u.error),invalidText:p,warn:!!f,warnText:f,value:m}))))},ge=n(6680),Ce={};Ce.styleTagTransform=T(),Ce.setAttributes=O(),Ce.insert=k().bind(null,"head"),Ce.domAPI=w(),Ce.insertStyleElement=F(),y()(ge.Z,Ce);const he=ge.Z&&ge.Z.locals?ge.Z.locals:void 0;function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ve=/^([^0-9]*)$/;function ye(e){if(!ve.test(e))return"numberInNameDubious"}var Ee=function(){var e,t,n=(0,d.useTranslation)().t,a=(0,r.useContext)(C),l=a.setCapturePhotoProps,c=a.currentPhoto,u=a.setFieldValue,A=(0,s.useConfig)().fieldConfigurations.name,m=A.displayCapturePhoto,p=A.allowUnidentifiedPatients,f=A.defaultUnknownGivenName,g=A.defaultUnknownFamilyName,h=A.displayMiddleName,b=A.displayReverseFieldOrder,v=(e=(0,_.U$)("attributes.".concat("8b56eac7-5c76-4b9c-8c6f-1deab8d3fc47")),t=3,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return be(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=v[0].value,E=v[2].setValue,w="true"===y,D=(0,r.useCallback)((function(e,t){l&&l({imageData:e,dateTime:t})}),[l]),k=i().createElement(fe,{id:"givenName",name:"givenName",labelText:n("givenNameLabelText","First Name"),checkWarning:ye,required:!0}),B=h&&i().createElement(fe,{id:"middleName",name:"middleName",labelText:n("middleNameLabelText","Middle Name"),checkWarning:ye}),O=i().createElement(fe,{id:"familyName",name:"familyName",labelText:n("familyNameLabelText","Family Name"),checkWarning:ye,required:!0});return i().createElement("div",null,i().createElement("h4",{className:he.productiveHeading02Light},n("fullNameLabelText","Full Name")),i().createElement("div",{className:he.grid},m&&i().createElement(s.ExtensionSlot,{className:he.photoExtension,name:"capture-patient-photo-slot",state:{onCapturePhoto:D,initialState:c}}),i().createElement("div",{className:he.nameField},(p||w)&&i().createElement(i().Fragment,null,i().createElement("div",{className:he.dobContentSwitcherLabel},i().createElement("span",{className:he.label01},n("patientNameKnown","Patient's Name is Known?"))),i().createElement(o.GHR,{className:he.contentSwitcher,selectedIndex:w?1:0,onChange:function(e){"known"===e.name?(u("givenName",""),u("familyName",""),E("false")):(u("givenName",f),u("familyName",g),E("true"))}},i().createElement(o.rsf,{name:"known",text:n("yes","Yes")}),i().createElement(o.rsf,{name:"unknown",text:n("no","No")}))),!w&&(b?i().createElement(i().Fragment,null,O,B,k):i().createElement(i().Fragment,null,k,B,O)))))};function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var De=function(){var e,t,n=(0,s.useConfig)().fieldConfigurations,a=(0,d.useTranslation)().t,l=(e=(0,_.U$)("gender"),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return we(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1],A=(0,r.useContext)(C).setFieldValue,m=null==n?void 0:n.gender;return i().createElement("div",{className:he.halfWidthInDesktopView},i().createElement("h4",{className:he.productiveHeading02Light},a("sexFieldLabelText","Sex")),i().createElement("div",{className:he.sexField},i().createElement("p",{className:"cds--label"},a("genderLabelText","Sex")),i().createElement(o.SYO,{name:"gender",orientation:"vertical",onChange:function(e){A("gender",e)},valueSelected:c.value},m.map((function(e){return i().createElement(o.EUY,{key:e.label,id:e.id,value:e.value,labelText:a("".concat(e.label),"".concat(e.label))})}))),u.touched&&u.error&&i().createElement("div",{className:he.radioFieldError},a(u.error,"Gender is required"))))},ke=n(6759),Be=n(2074),Oe=n(4102),xe={};xe.styleTagTransform=T(),xe.setAttributes=O(),xe.insert=k().bind(null,"head"),xe.domAPI=w(),xe.insertStyleElement=F(),y()(Oe.Z,xe);const Fe=Oe.Z&&Oe.Z.locals?Oe.Z.locals:void 0;function Se(){return Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Se.apply(this,arguments)}const Te=function(e){var t=e.close,n=e.children,r=e.header,a=e.buttonsGroup,l=(0,d.useTranslation)().t,c=(0,s.useLayoutType)();return i().createElement("div",{className:(0,s.isDesktop)(c)?Fe.desktopOverlay:Fe.tabletOverlay},(0,s.isDesktop)(c)?i().createElement("div",{className:Fe.desktopHeader},i().createElement("div",{className:Fe.headerContent},r),i().createElement(o.zxk,{className:Fe.closeButton,iconDescription:l("closeOverlay","Close overlay"),onClick:t,kind:"ghost",hasIconOnly:!0,renderIcon:function(e){return i().createElement(Be.x8,Se({size:16},e))}})):i().createElement(o.h4i,{className:Fe.tabletOverlayHeader,"aria-label":"Overlay header"},i().createElement(o.zxk,{kind:"ghost",onClick:t,hasIconOnly:!0,iconDescription:l("closeOverlay","Close overlay"),renderIcon:function(e){return i().createElement(ke.Xd,Se({size:16,onClick:t},e))}}),i().createElement("div",{className:Fe.headerContent},r)),i().createElement("div",{className:Fe.overlayContent},n),i().createElement("div",null,a))};function Ie(e){return Ne(e)&&!e.identifierSources.some((function(e){var t,n;return!(null===(t=e.autoGenerationOption)||void 0===t?void 0:t.manualEntryEnabled)&&(null===(n=e.autoGenerationOption)||void 0===n?void 0:n.automaticGenerationEnabled)}))}function Ne(e){return"UNIQUE"===e.uniquenessBehavior||"LOCATION"===e.uniquenessBehavior}var je=n(1033),Pe={};Pe.styleTagTransform=T(),Pe.setAttributes=O(),Pe.insert=k().bind(null,"head"),Pe.domAPI=w(),Pe.insertStyleElement=F(),y()(je.Z,Pe);const Ge=je.Z&&je.Z.locals?je.Z.locals:void 0;function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ue(e,t,n[t])}))}return e}function We(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Le(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const qe=function(e){var t,n=e.closeOverlay,a=e.setFieldValue,c=(0,s.useLayoutType)(),u=(0,r.useContext)(l.Cg).identifierTypes,A=(0,r.useContext)(C),_=A.isOffline,m=A.values,p=A.initialFormValues,f=Re((0,r.useState)(m.identifiers),2),g=f[0],h=f[1],b=Re((0,r.useState)(""),2),v=b[0],y=b[1],E=(0,d.useTranslation)().t,w=(0,s.useConfig)().defaultPatientIdentifierTypes,D=(0,r.useMemo)((function(){var e={};return null==w||w.forEach((function(t){e[t]=!0})),e}),[w]);(0,r.useEffect)((function(){h(m.identifiers)}),[m.identifiers]);var k=(0,r.useCallback)((function(e){var n;return y(null!==(t=null==e||null===(n=e.target)||void 0===n?void 0:n.value)&&void 0!==t?t:"")}),[]),B=(0,r.useMemo)((function(){return null==u?void 0:u.filter((function(e){var t;return null==e||null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(v.toLowerCase())}))}),[g,v]),O=function(e,t){return h((function(n){var r,i;return t?We(Me({},n),Ue({},e.fieldName,it(e,null!==(i=null!==(r=m.identifiers[e.fieldName])&&void 0!==r?r:p.identifiers[e.fieldName])&&void 0!==i?i:{}))):n[e.fieldName]?Object.fromEntries(Object.entries(n).filter((function(t){return Re(t,1)[0]!==e.fieldName}))):n}))},x=(0,r.useMemo)((function(){return B.map((function(e){var t,n,r=g[e.fieldName],a=e.isPrimary||e.required||D[e.uuid]||m.identifiers[e.fieldName],s=_&&Ie(e);return i().createElement("div",{key:e.uuid,className:Ge.space05},i().createElement(o.XZJ,{id:e.uuid,value:e.uuid,labelText:e.name,onChange:function(t,n){var r=n.checked;return O(e,r)},checked:!!r,disabled:a||_&&s}),r&&(null==e||null===(t=e.identifierSources)||void 0===t?void 0:t.length)>0&&(!r.initialValue||(null==r?void 0:r.selectedSource))&&i().createElement("div",{className:Ge.radioGroup},i().createElement(o.SYO,{legendText:E("source","Source"),name:"".concat(null==e?void 0:e.fieldName,"-identifier-sources"),defaultSelected:null==r||null===(n=r.selectedSource)||void 0===n?void 0:n.uuid,onChange:function(t){return function(e,t){return h((function(n){return We(Me({},n),Ue({},e.fieldName,Me({},n[e.fieldName],rt(e.identifierSources.find((function(e){return e.uuid===t})),n[e.fieldName].identifierValue,n[e.fieldName].initialValue))))}))}(e,t)},orientation:"vertical"},null==e?void 0:e.identifierSources.map((function(t){var n;return i().createElement(o.EUY,{key:t.uuid,labelText:t.name,name:t.uuid,value:t.uuid,className:Ge.radioButton,disabled:_&&Ne(e)&&(null===(n=t.autoGenerationOption)||void 0===n?void 0:n.manualEntryEnabled)})})))))}))}),[B,g,D,m.identifiers,_,O]),F=(0,r.useCallback)((function(){a("identifiers",g),n()}),[g,a]);return i().createElement(Te,{close:n,header:E("configureIdentifiers","Configure identifiers"),buttonsGroup:i().createElement(o.uVA,{className:(0,s.isDesktop)(c)?Ge.desktop:Ge.tablet},i().createElement(o.zxk,{className:Ge.button,kind:"secondary",onClick:n},E("cancel","Cancel")),i().createElement(o.zxk,{className:Ge.button,kind:"primary",onClick:F},E("configureIdentifiers","Configure identifiers")))},i().createElement("div",null,i().createElement("p",{className:Ge.bodyLong02},E("IDInstructions","Select the identifiers you'd like to add for this patient:")),u.length>7&&i().createElement("div",{className:Ge.space05},i().createElement(o.olm,{labelText:E("searchIdentifierPlaceholder","Search identifier"),placeholder:E("searchIdentifierPlaceholder","Search identifier"),onChange:k,value:v})),i().createElement("fieldset",null,x)))};var Ze=n(7631),ze=n(3469),Ve=n(5508);function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xe(){return Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xe.apply(this,arguments)}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ye(e,t,n[t])}))}return e}function Qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return He(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ke=function(e){var t=e.patientIdentifier,n=e.fieldName,a=(0,d.useTranslation)().t,c=(0,s.useConfig)().defaultPatientIdentifierTypes,u=(0,r.useContext)(l.Cg).identifierTypes,A=(0,r.useContext)(C),m=A.isOffline,p=A.values,f=A.setFieldValue,g=(0,r.useMemo)((function(){return u.find((function(e){return e.uuid===t.identifierTypeUuid}))}),[t,u]),h=t.autoGeneration,b=t.initialValue,v=t.identifierValue,y=t.identifierName,E=t.required,w=Qe((0,r.useState)(h||b===v),2),D=w[0],k=w[1],B="identifiers.".concat(n,".identifierValue"),O=Qe((0,_.U$)(B),2),x=O[0],F=O[1],S=m&&Ie(g),T=(0,r.useMemo)((function(){var e={};return null==c||c.forEach((function(t){e[t]=!0})),e}),[c]),I=(0,r.useCallback)((function(){var e,r;k(!0),f("identifiers.".concat(n),(e=Je({},t),r=null!=(r={identifierValue:b,selectedSource:null,autoGeneration:!1})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e))}),[b,k]);return i().createElement("div",{className:j.IDInput},h||D?i().createElement("div",{className:j.textID},i().createElement("p",{className:j.label},y),i().createElement("p",{className:j.bodyShort02},h?a("autoGeneratedPlaceholderText","Auto-generated"):v),i().createElement("input",Xe({type:"hidden"},x,{disabled:!0})),!(!F.touched||!F.error)&&i().createElement("span",{className:j.dangerLabel01},F.error&&a(F.error))):i().createElement(fe,Xe({id:B,labelText:y,name:B,disabled:S,required:E,invalid:!(!F.touched||!F.error),invalidText:F.error&&a(F.error)},x)),i().createElement("div",{style:{marginBottom:"1rem"}},!t.required&&t.initialValue&&D&&i().createElement(s.UserHasAccess,{privilege:"Edit Patient Identifiers"},i().createElement(o.zxk,{size:"md",kind:"ghost",onClick:function(){var e;k(!1),f("identifiers.".concat(n),Je({},t,rt(null==g||null===(e=g.identifierSources)||void 0===e?void 0:e[0],b,b)))},iconDescription:a("editIdentifierTooltip","Edit"),disabled:S,hasIconOnly:!0},i().createElement(Ze.I8,{size:16}))),b&&b!==v&&i().createElement(s.UserHasAccess,{privilege:"Edit Patient Identifiers"},i().createElement(o.zxk,{size:"md",kind:"ghost",onClick:I,iconDescription:a("resetIdentifierTooltip","Reset"),disabled:S,hasIconOnly:!0},i().createElement(ze.AG,{size:16}))),!t.required&&!T[t.identifierTypeUuid]&&i().createElement(s.UserHasAccess,{privilege:"Delete Patient Identifiers"},i().createElement(o.zxk,{size:"md",kind:"danger--ghost",onClick:function(){if(b)var e=(0,s.showModal)("delete-identifier-confirmation-modal",{deleteIdentifier:function(t){t&&f("identifiers",at(p.identifiers,n)),e()},identifierName:y,initialValue:b});else f("identifiers",at(p.identifiers,n))},iconDescription:a("deleteIdentifierTooltip","Delete"),disabled:S,hasIconOnly:!0},i().createElement(Ve.ZN,{size:16})))))};function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){et(e,t,n[t])}))}return e}function nt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$e(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(e,t,n){var r,i=null==e||null===(r=e.autoGenerationOption)||void 0===r?void 0:r.automaticGenerationEnabled;return{selectedSource:e,autoGeneration:i,identifierValue:i?"auto-generated":"auto-generated"!==t?t:n}}function it(e,t){var n,r,i;return tt({identifierTypeUuid:e.uuid,identifierName:e.name,preferred:e.isPrimary,initialValue:"",required:e.isPrimary||e.required},t,rt(null!==(r=null==t?void 0:t.selectedSource)&&void 0!==r?r:null===(n=e.identifierSources)||void 0===n?void 0:n[0],null==t?void 0:t.identifierValue,null!==(i=null==t?void 0:t.initialValue)&&void 0!==i?i:""))}function at(e,t){return Object.fromEntries(Object.entries(e).filter((function(e){return nt(e,1)[0]!==t})))}var ot=function(){var e=(0,r.useContext)(l.Cg).identifierTypes,t=!e,n=(0,r.useContext)(C),a=n.values,c=n.setFieldValue,u=n.initialFormValues,A=n.isOffline,_=(0,d.useTranslation)().t,m=(0,s.useLayoutType)(),p=nt((0,r.useState)(!1),2),f=p[0],g=p[1],h=(0,s.useConfig)().defaultPatientIdentifierTypes;return(0,r.useEffect)((function(){if(e){var t={};e.filter((function(e){return e.isPrimary||e.required||!!(null==h?void 0:h.find((function(t){return t===e.uuid})))})).filter((function(e){return!a.identifiers[e.fieldName]})).forEach((function(e){var n,r;t[e.fieldName]=it(e,null!==(r=null!==(n=a.identifiers[e.uuid])&&void 0!==n?n:u.identifiers[e.uuid])&&void 0!==r?r:{})})),Object.keys(t).length&&c("identifiers",tt({},a.identifiers,t))}}),[e,c,h,a.identifiers,it]),t&&!A?i().createElement("div",{"data-testid":"loading-skeleton",className:he.halfWidthInDesktopView},i().createElement("div",{className:he.identifierLabelText},i().createElement("h4",{className:he.productiveHeading02Light},_("idFieldLabelText","Identifiers"))),i().createElement(o.N2B,null)):i().createElement("div",{className:he.halfWidthInDesktopView},i().createElement(s.UserHasAccess,{privilege:["Get Identifier Types","Add Patient Identifiers"]},i().createElement("div",{className:he.identifierLabelText},i().createElement("h4",{className:he.productiveHeading02Light},_("idFieldLabelText","Identifiers")),i().createElement(o.zxk,{kind:"ghost",className:he.setIDNumberButton,onClick:function(){return g(!0)},size:(0,s.isDesktop)(m)?"sm":"md"},_("configure","Configure")," ",i().createElement(ke.ol,{size:16})))),i().createElement("div",null,Object.entries(a.identifiers).map((function(e){var t=nt(e,2),n=t[0],r=t[1];return i().createElement(Ke,{key:n,fieldName:n,patientIdentifier:r})})),f&&i().createElement(qe,{setFieldValue:c,closeOverlay:function(){return g(!1)}})))};function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lt(){return lt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(this,arguments)}function ct(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return st(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?st(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ut=function(e,t,n){var r=n.useEstimatedDateOfBirth,i=r.enabled,a=r.month,o=r.dayOfMonth,s=new Date,l=new Date(s.getFullYear()-e,s.getMonth()-t,1),c=new Date(l.getFullYear(),l.getMonth()+1,0).getDate(),u=new Date(l.getFullYear(),l.getMonth(),Math.min(s.getDate(),c));return i?new Date(u.getFullYear(),a,o):u},At=function(){var e,t,n=(0,d.useTranslation)().t,a=(0,s.useConfig)().fieldConfigurations.dateOfBirth,l=null==a?void 0:a.allowEstimatedDateOfBirth,c=ct((0,_.U$)("birthdateEstimated"),1)[0].value,u=ct((0,_.U$)("birthdate"),2),A=u[0],m=u[1],p=ct((0,_.U$)("yearsEstimated"),2),f=p[0],g=p[1],h=ct((0,_.U$)("monthsEstimated"),2),b=h[0],v=h[1],y=(0,r.useContext)(C).setFieldValue,E=(t="/",{parse:function(n){var r=n.split(t),i=new Date(null);return e.forEach((function(e,t){switch(e){case"d":i.setDate(parseInt(r[t]));break;case"m":i.setMonth(parseInt(r[t])-1);break;case"Y":i.setFullYear(parseInt(r[t]))}})),i},format:function(n){if(null===n)return"";if(i=n,null!=(a=Date)&&"undefined"!=typeof Symbol&&a[Symbol.hasInstance]?a[Symbol.hasInstance](i):i instanceof a){var r=[];return e.forEach((function(e,t){switch(e){case"d":r[t]=n.getDate();break;case"m":r[t]=n.getMonth()+1;break;case"Y":r[t]=n.getFullYear()}})),r.join(t)}return n;var i,a},placeHolder:(e=["d","m","Y"]).map((function(e){return"Y"===e?"YYYY":e+e})).join(t),dateFormat:e.join(t)}),w=E.format,D=E.placeHolder,k=E.dateFormat,B=new Date,O=function(){var e=+v.value%12,t=+g.value+Math.floor(v.value/12);y("yearsEstimated",t),y("monthsEstimated",e>0?e:""),y("birthdate",ut(t,e,a))};return i().createElement("div",{className:he.halfWidthInDesktopView},i().createElement("h4",{className:he.productiveHeading02Light},n("birthFieldLabelText","Birth")),(l||c)&&i().createElement("div",{className:he.dobField},i().createElement("div",{className:he.dobContentSwitcherLabel},i().createElement("span",{className:he.label01},n("dobToggleLabelText","Date of Birth Known?"))),i().createElement(o.GHR,{onChange:function(e){y("birthdateEstimated","unknown"===e.name),y("birthdate",""),y("yearsEstimated",0),y("monthsEstimated","")},selectedIndex:c?1:0},i().createElement(o.rsf,{name:"known",text:n("yes","Yes")}),i().createElement(o.rsf,{name:"unknown",text:n("no","No")}))),i().createElement(o.mh4,null,c?i().createElement("div",{className:he.grid},i().createElement("div",{className:he.dobField},i().createElement(o.mh4,null,i().createElement(o.oil,lt({id:"yearsEstimated",type:"number",name:f.name,onChange:function(e){var t=+e.target.value;!isNaN(t)&&t<140&&t>=0&&(y("yearsEstimated",t),y("birthdate",ut(t,v.value,a)))},labelText:n("estimatedAgeInYearsLabelText","Estimated age in years"),invalid:!(!g.touched||!g.error),invalidText:g.error&&n(g.error),value:f.value,min:0,required:!0},f,{onBlur:O})))),i().createElement("div",{className:he.dobField},i().createElement(o.mh4,null,i().createElement(o.oil,lt({id:"monthsEstimated",type:"number",name:b.name,onChange:function(e){var t=+e.target.value;isNaN(t)||(y("monthsEstimated",t),y("birthdate",ut(g.value,t,a)))},labelText:n("estimatedAgeInMonthsLabelText","Estimated age in months"),invalid:!(!v.touched||!v.error),invalidText:v.error&&n(v.error),value:b.value,min:0},b,{required:!g.value,onBlur:O}))))):i().createElement("div",{className:he.dobField},i().createElement(s.OpenmrsDatePicker,lt({id:"birthdate"},A,{dateFormat:k,onChange:function(e){y("birthdate",e)},maxDate:w(B),labelText:n("dateOfBirthLabelText","Date of Birth"),invalid:!(!m.touched||!m.error),invalidText:m.error&&n(m.error),value:w(A.value),carbonOptions:{placeholder:D}})))))};function dt(){return dt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(this,arguments)}var _t=function(e){var t=e.fieldDefinition,n=(0,d.useTranslation)().t;return i().createElement("div",{className:"".concat(he.customField," ").concat(he.halfWidthInDesktopView)},i().createElement(_.gN,{name:t.id},(function(e){var r=e.field,a=e.form;return a.touched,a.errors,e.meta,i().createElement(fe,dt({id:t.id,labelText:n("".concat(t.label),"".concat(t.label))},r))})))},mt=n(2303);function pt(e){var t,n="string"==typeof e&&""!==e,r=(0,mt.Z)(n?"/ws/rest/v1/concept/".concat(e):null,s.openmrsFetch),i=r.data,a=r.error,o=r.isLoading;return a&&(0,s.showToast)({title:a.name,description:a.message,kind:"error"}),{data:null==i||null===(t=i.data)||void 0===t?void 0:t.answers,isLoading:o}}function ft(){return ft=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ft.apply(this,arguments)}function gt(e){var t=e.fieldDefinition,n=function(e){var t="string"==typeof e&&""!==e,n=(0,mt.Z)(t?"/ws/rest/v1/concept/".concat(e):null,s.openmrsFetch),r=n.data,i=n.error,a=n.isLoading;return i&&(0,s.showToast)({title:i.name,description:i.message,kind:"error"}),{data:null==r?void 0:r.data,isLoading:a}}(t.uuid),r=n.data,a=n.isLoading;if(!(0,s.useConfig)().registrationObs.encounterTypeUuid)return console.error("The registration form has been configured to have obs fields, but no registration encounter type has been configured. Obs fields will not be displayed."),null;if(a)return null;switch(r.datatype.display){case"Text":return i().createElement(Ct,{concept:r,validationRegex:t.validation.matches,label:t.label,required:t.validation.required});case"Numeric":return i().createElement(ht,{concept:r,label:t.label,required:t.validation.required});case"Coded":return i().createElement(bt,{concept:r,answerConceptSetUuid:t.answerConceptSetUuid,label:t.label,required:t.validation.required});default:return i().createElement(o.K0D,{kind:"error",title:"Error"},'Concept has unknown datatype "',r.datatype.display,'"')}}function Ct(e){var t=e.concept,n=e.validationRegex,r=e.label,a=e.required,o=(0,d.useTranslation)().t,s="obs.".concat(t.uuid);return i().createElement("div",{className:"".concat(he.customField," ").concat(he.halfWidthInDesktopView)},i().createElement(_.gN,{name:s,validate:function(e){if(e&&n&&""!==n&&"string"==typeof n&&""!==e)return new RegExp(n).test(e)?void 0:o("invalidInput","Invalid Input")}},(function(e){var n=e.field,o=e.form,l=o.touched,c=o.errors;return e.meta,i().createElement(fe,ft({id:s,labelText:null!=r?r:t.display,required:a,invalid:c[s]&&l[s]},n))})))}function ht(e){var t=e.concept,n=e.label,r=e.required,a=((0,d.useTranslation)().t,"obs.".concat(t.uuid));return i().createElement("div",{className:"".concat(he.customField," ").concat(he.halfWidthInDesktopView)},i().createElement(_.gN,{name:a},(function(e){var o=e.field,s=e.form,l=s.touched,c=s.errors;return e.meta,i().createElement(fe,ft({id:a,labelText:null!=n?n:t.display,required:r,invalid:c[a]&&l[a],type:"number"},o))})))}function bt(e){var t,n=e.concept,r=e.answerConceptSetUuid,a=e.label,l=e.required,c=(0,s.useConfig)(),u=pt(null!=r?r:n.uuid),A=u.data,d=u.isLoading,m="obs.".concat(n.uuid),p=null==c||null===(t=c.fieldDefinitions)||void 0===t?void 0:t.filter((function(e){return"obs"===e.type&&e.uuid===n.uuid}))[0];return i().createElement("div",{className:"".concat(he.customField," ").concat(he.halfWidthInDesktopView)},d?null:i().createElement(_.gN,{name:m},(function(e){var t,r=e.field,s=e.form,c=s.touched,u=s.errors;return e.meta,(null==p||null===(t=p.customConceptAnswers)||void 0===t?void 0:t.length)?i().createElement(o.mh4,null,i().createElement(o.PhF,ft({id:m,name:m,required:l,labelText:null!=a?a:null==n?void 0:n.display,invalid:u[m]&&c[m]},r),i().createElement(o.QlF,{key:"no-answer-select-item-".concat(m),value:"",text:""}),null==p?void 0:p.customConceptAnswers.map((function(e){return i().createElement(o.QlF,{key:e.uuid,value:e.uuid,text:e.label})})))):i().createElement(o.mh4,null,i().createElement(o.PhF,ft({id:m,name:m,labelText:null!=a?a:null==n?void 0:n.display,required:l,invalid:u[m]&&c[m]},r),i().createElement(o.QlF,{key:"no-answer-select-item-".concat(m),value:"",text:""}),A.map((function(e){return i().createElement(o.QlF,{key:e.uuid,value:e.uuid,text:e.display})}))))})))}function vt(){return vt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vt.apply(this,arguments)}function yt(e){var t=e.id,n=e.personAttributeType,r=e.answerConceptSetUuid,a=e.label,s=pt(r),l=s.data,c=s.isLoading,u=(0,d.useTranslation)().t,A="attributes.".concat(n.uuid);return i().createElement("div",{className:"".concat(he.customField," ").concat(he.halfWidthInDesktopView)},!c&&(null==l?void 0:l.length)?i().createElement(o.mh4,null,i().createElement(_.gN,{name:A},(function(e){var r=e.field,s=e.form,c=s.touched,d=s.errors;return e.meta,i().createElement(i().Fragment,null,i().createElement(o.PhF,vt({id:t,name:"person-attribute-".concat(n.uuid),labelText:null!=a?a:null==n?void 0:n.display,invalid:d[A]&&c[A]},r),i().createElement(o.QlF,{value:"",text:u("selectAnOption","Select an option")}),l.map((function(e){return i().createElement(o.QlF,{key:e.uuid,value:e.uuid,text:e.display})}))))}))):i().createElement(o.mh4,null,i().createElement(_.gN,{name:A},(function(e){var r=e.field,o=e.form,s=o.touched,l=o.errors;return e.meta,i().createElement(fe,vt({id:t,name:"person-attribute-".concat(n.uuid),labelText:null!=a?a:null==n?void 0:n.display,invalid:l[A]&&s[A]},r))}))))}function Et(){return Et=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Et.apply(this,arguments)}function wt(e){var t=e.id,n=e.personAttributeType,r=e.validationRegex,a=e.label,o=e.required,s=(0,d.useTranslation)().t,l="attributes.".concat(n.uuid);return i().createElement("div",{className:"".concat(he.customField," ").concat(he.halfWidthInDesktopView)},i().createElement(_.gN,{name:l,validate:function(e){if(e&&r&&""!==r&&"string"==typeof r&&""!==e)return new RegExp(r).test(e)?void 0:s("invalidInput","Invalid Input")}},(function(e){var r=e.field,s=e.form,c=s.touched,u=s.errors;return e.meta,i().createElement(fe,Et({id:t,name:"person-attribute-".concat(n.uuid),labelText:null!=a?a:null==n?void 0:n.display,invalid:u[l]&&c[l]},r,{required:o}))})))}function Dt(e){var t,n,a=e.fieldDefinition,l=function(e){var t=(0,mt.Z)("/ws/rest/v1/personattributetype/".concat(e),s.openmrsFetch),n=t.data,r=t.error,i=t.isLoading;return{data:null==n?void 0:n.data,isLoading:i,error:r}}(a.uuid),c=l.data,u=l.isLoading,A=l.error,_=(0,d.useTranslation)().t,m=(0,r.useMemo)((function(){if(!c)return null;switch(c.format){case"java.lang.String":return i().createElement(wt,{personAttributeType:c,validationRegex:a.validation.matches,label:a.label,required:a.validation.required,id:null==a?void 0:a.id});case"org.openmrs.Concept":return i().createElement(yt,{personAttributeType:c,answerConceptSetUuid:a.answerConceptSetUuid,label:a.label,id:null==a?void 0:a.id});default:return i().createElement(o.K0D,{kind:"error",title:"Error"},'Patient attribute type has unknown format "',c.format,'"')}}),[c,a,_]);return u?i().createElement("div",null,a.showHeading&&i().createElement("h4",{className:he.productiveHeading02Light},null==a?void 0:a.label),i().createElement(o.znL,null)):A?i().createElement("div",null,a.showHeading&&i().createElement("h4",{className:he.productiveHeading02Light},null==a?void 0:a.label),i().createElement(o.K0D,{kind:"error",title:_("error","Error")},_("unableToFetch","Unable to fetch person attribute type - {personattributetype}",{personattributetype:null!==(t=null==a?void 0:a.label)&&void 0!==t?t:null==a?void 0:a.id}))):i().createElement("div",null,a.showHeading&&i().createElement("h4",{className:he.productiveHeading02Light},null!==(n=null==a?void 0:a.label)&&void 0!==n?n:null==c?void 0:c.display),m)}function kt(e){var t=e.name,n=(0,s.useConfig)().fieldDefinitions.filter((function(e){return e.id==t}))[0];return"person attribute"===n.type?i().createElement(Dt,{fieldDefinition:n}):"obs"===n.type?i().createElement(gt,{fieldDefinition:n}):"address"===n.type?i().createElement(_t,{fieldDefinition:n}):i().createElement("div",null,"Error: Unknown field type ",n.type)}function Bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xt(){var e=(0,mt.Z)("/module/addresshierarchy/ajax/getOrderedAddressHierarchyLevels.form",s.openmrsFetch),t=e.data,n=e.isLoading,i=e.error,a=(0,r.useMemo)((function(){var e;return{orderedFields:null==t||null===(e=t.data)||void 0===e?void 0:e.map((function(e){return e.addressField})),isLoadingFieldOrder:n,errorFetchingFieldOrder:i}}),[t,n,i]);return a}function Ft(e){var t,n,i=xt(),a=i.orderedFields,o=i.isLoadingFieldOrder,s=(0,r.useContext)(C).setFieldValue,l=(t=(0,_.U$)("address"),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bt(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1].value,c=(0,r.useMemo)((function(){return o?-1:a.findIndex((function(t){return t===e}))}),[a,e,o]),u=(0,r.useMemo)((function(){var e,t=!0,n=null!==(e=null==a?void 0:a.slice(0,c))&&void 0!==e?e:[],r=[],i=!0,o=!1,s=void 0;try{for(var u,A=n[Symbol.iterator]();!(i=(u=A.next()).done);i=!0){var d=u.value;if(!l[d]){t=!1;break}r.push(l[d])}}catch(e){o=!0,s=e}finally{try{i||null==A.return||A.return()}finally{if(o)throw s}}return{fetchEntriesForField:t,searchString:r.join("|")}}),[a,c,l]),A=(0,r.useCallback)((function(){o||a.slice(c+1).map((function(e){s("address.".concat(e),"")}))}),[c,o,a,s]),d=(0,r.useMemo)((function(){return e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ot(e,t,n[t])}))}return e}({},u),t=null!=(t={updateChildElements:A})?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e;var e,t}),[u,A]);return d}var St=n(6788),Tt={};Tt.styleTagTransform=T(),Tt.setAttributes=O(),Tt.insert=k().bind(null,"head"),Tt.domAPI=w(),Tt.insertStyleElement=F(),y()(St.Z,Tt);const It=St.Z&&St.Z.locals?St.Z.locals:void 0;function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jt(e,t){if(e){if("string"==typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nt(e,t):void 0}}const Pt=function(e){var t,n,a=e.addressLayout,l=(0,d.useTranslation)().t,c=" > ",u=(0,r.useRef)(null),A=(0,r.useRef)(null),m=(t=(0,r.useState)(""),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||jt(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],f=m[1],g=function(e,t){var n,i=(0,mt.Z)(e?"/module/addresshierarchy/ajax/getPossibleFullAddresses.form?separator=".concat(t,"&searchString=").concat(e):null,s.openmrsFetch),a=i.data,o=i.error,l=i.isLoading,c=(0,r.useMemo)((function(){var e;return{addresses:null!==(n=null==a||null===(e=a.data)||void 0===e?void 0:e.map((function(e){return e.address})))&&void 0!==n?n:[],error:o,isLoading:l}}),[null==a?void 0:a.data,o,l]);return c}(p,c),C=g.addresses,h=g.isLoading,b=g.error,v=(0,r.useMemo)((function(){var e=new Set;return C.forEach((function(t){var n=t.split(c);n.forEach((function(t,r){t.toLowerCase().includes(p.toLowerCase())&&e.add(n.slice(0,r+1).join(c))}))})),function(e){return function(e){if(Array.isArray(e))return Nt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e)}),[C,p]),y=(0,_.u6)().setFieldValue,E=function(e){A.current&&!A.current.contains(e.target)&&f("")};return(0,r.useEffect)((function(){return document.addEventListener("mousedown",E),function(){document.removeEventListener("mousedown",E)}}),[A]),i().createElement("div",{className:It.autocomplete,ref:A,style:{marginBottom:"1rem"}},i().createElement(o.olm,{onChange:function(e){f(e.target.value)},labelText:l("searchAddress","Search address"),placeholder:l("searchAddress","Search address"),ref:u,helperText:p?h?l("loadingResults","Loading results"):b?b.message:0===(null==C?void 0:C.length)?l("noResultsFound","No results found"):null:null,value:p}),v.length>0&&i().createElement("ul",{className:It.suggestions},v.map((function(e,t){return i().createElement("li",{key:t,onClick:function(t){return function(e){if(e){var t=e.split(c);a.map((function(e,n){var r,i=e.name;y("address.".concat(i),null!==(r=null==t?void 0:t[n])&&void 0!==r?r:"")})),f("")}}(e)}},e)}))))},Gt=function(){return i().createElement("svg",{focusable:"false",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",width:"16",height:"16",viewBox:"0 0 32 32","aria-hidden":"true",className:"cds--list-box__menu-item__selected-icon"},i().createElement("path",{d:"M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"}))};function Lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ut(){return Ut=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ut.apply(this,arguments)}function Mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Wt=function(e){var t=e.entries,n=e.fieldProps,a=e.handleInputChange,s=e.handleSelection,l=Mt((0,r.useState)(-1),2),c=l[0],u=l[1],A=n.value,d=void 0===A?"":A,_=Mt((0,r.useState)(!1),2),m=_[0],p=_[1],f=(0,r.useRef)(null),g=(0,r.useCallback)((function(){p(!0),u(-1)}),[p,u]),C=(0,r.useMemo)((function(){return t?d?t.filter((function(e){return e.toLowerCase().includes(d.toLowerCase())})):t:[]}),[t,d]),h=(0,r.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null==t||t.preventDefault(),s(e),p(!1)}),[s,p]),b=(0,r.useCallback)((function(e){var t,n=null!==(t=C.length)&&void 0!==t?t:0;"Tab"===e.key&&(p(!1),u(-1)),"ArrowUp"===e.key?u((function(e){return Math.max(-1,e-1)})):"ArrowDown"===e.key?u((function(e){return Math.min(n-1,e+1)})):"Enter"===e.key&&c>-1&&h(C[c],e)}),[c,h,C,u,p]);return(0,r.useEffect)((function(){var e=function(e){f.current.contains(e.target)||(p(!1),u(-1))};return window.addEventListener("click",e),function(){window.removeEventListener("click",e)}})),i().createElement("div",{className:j.comboInput,ref:f},i().createElement(o.mh4,null,i().createElement(o.oil,Ut({},n,{onChange:function(e){u(-1),a(e.target.value)},onFocus:g,autoComplete:"off",onKeyDown:b}))),i().createElement("div",{className:j.comboInputEntries},m&&i().createElement("div",{className:"cds--combo-box cds--list-box cds--list-box--expanded"},i().createElement("div",{id:"downshift-1-menu",className:"cds--list-box__menu",role:"listbox"},C.map((function(e,t){return i().createElement("div",{key:t,id:"downshift-1-item-0",role:"option",className:"cds--list-box__menu-item ".concat(t===c&&"cds--list-box__menu-item--highlighted"),tabIndex:-1,"aria-selected":"true",onClick:function(){return h(e)}},i().createElement("div",{className:"cds--list-box__menu-item__option ".concat(j.comboInputItemOption," ").concat(e===d&&"cds--list-box__menu-item--active")},e,e===d&&i().createElement(Gt,null)))}))))))};function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){qt(e,t,n[t])}))}return e}const zt=function(e){var t=e.orderedAddressFields;return(0,d.useTranslation)().t,i().createElement(i().Fragment,null,t.map((function(e){return i().createElement(Vt,{key:e.id,attribute:e})})))};var Vt=function(e){var t,n,a,o,l=e.attribute,c=(0,d.useTranslation)().t,u=(t=(0,_.U$)("address.".concat(l.name)),n=3,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),A=u[0],m=u[1],p=u[2].setValue,f=Ft(l.name),g=f.fetchEntriesForField,C=f.searchString,h=f.updateChildElements,b=function(e,t){var n=encodeURIComponent(t),i=(0,mt.Z)(e?"module/addresshierarchy/ajax/getChildAddressHierarchyEntries.form?searchString=".concat(n):null,s.openmrsFetch),a=i.data,o=i.isLoading,l=i.error;(0,r.useEffect)((function(){l&&console.error(l)}),[l]);var c=(0,r.useMemo)((function(){var e;return{entries:null==a||null===(e=a.data)||void 0===e?void 0:e.map((function(e){return e.name})),isLoadingAddressEntries:o,errorFetchingAddressEntries:l}}),[a,o,l]);return c}(g,C).entries,v=c(l.label)+((null==l?void 0:l.required)?"":" (".concat(c("optional","optional"),")")),y=(0,r.useCallback)((function(e){p(e)}),[p]),E=(0,r.useCallback)((function(e){m.value!==e&&(p(e),h())}),[h,m.value,p]);return i().createElement(Wt,{entries:b,handleSelection:E,name:"address.".concat(l.name),fieldProps:(a=Zt({},A),o={id:l.name,labelText:v,required:null==l?void 0:l.required},o=null!=o?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(o)).forEach((function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(o,e))})),a),handleInputChange:y})};function Ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||Xt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xt(e,t){if(e){if("string"==typeof e)return Ht(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ht(e,t):void 0}}var Jt=function(){var e=Yt((0,r.useState)(""),2),t=e[0],n=(e[1],(0,r.useContext)(l.Cg).addressTemplate),a=(0,r.useMemo)((function(){var e,t;if(!(null==n?void 0:n.lines))return[];var r=null==n||null===(e=n.lines)||void 0===e?void 0:e.flat(),i=null==r?void 0:r.filter((function(e){return"IS_ADDR_TOKEN"===e.isToken})),a=Object.fromEntries((null==n||null===(t=n.requiredElements)||void 0===t?void 0:t.map((function(e){return[e,e]})))||[]);return i.map((function(e){var t=e.displayText,n=e.codeName;return{id:n,name:n,label:t,required:Boolean(a[n])}}))}),[n]),c=(0,d.useTranslation)().t,u=(0,s.useConfig)().fieldConfigurations.address.useAddressHierarchy,A=u.enabled,_=u.useQuickSearch,m=u.searchAddressByLevel,p=(0,r.useContext)(C).setFieldValue,f=xt(),g=f.orderedFields,h=f.isLoadingFieldOrder,b=f.errorFetchingFieldOrder;(0,r.useEffect)((function(){(null==n?void 0:n.elementDefaults)&&Object.entries(n.elementDefaults).forEach((function(e){var t=Yt(e,2),n=t[0],r=t[1];p("address.".concat(n),r)}))}),[n,p]);var v=(0,r.useMemo)((function(){if(h||b)return[];var e,t=Object.fromEntries(g.map((function(e,t){return[e,t]})));return(e=a,function(e){if(Array.isArray(e))return Ht(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Xt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort((function(e,n){return t[e.name]-t[n.name]}))}),[h,b,g,a]);return n?A?h?i().createElement(Qt,null,i().createElement(o.N2B,null)):b?i().createElement(Qt,null,i().createElement(o.K0D,{style:{margin:"0",minWidth:"100%"},kind:"error",lowContrast:!0,title:c("errorFetchingOrderedFields","Error occured fetching ordered fields for address hierarchy")})):i().createElement(Qt,null,_&&i().createElement(Pt,{addressLayout:v}),m?i().createElement(zt,{orderedAddressFields:v}):v.map((function(e,n){return i().createElement(fe,{key:"combo_input_".concat(n),name:"address.".concat(e.name),labelText:c(e.label),id:e.name,selected:t,required:e.required})}))):i().createElement(Qt,null,a.map((function(e,n){return i().createElement(fe,{key:"combo_input_".concat(n),name:"address.".concat(e.name),labelText:c(e.label),id:e.name,selected:t,required:e.required})}))):i().createElement(Qt,null,i().createElement(o.N2B,null))},Qt=function(e){var t=e.children,n=(0,d.useTranslation)().t;return i().createElement("div",null,i().createElement("h4",{className:he.productiveHeading02Light},n("addressHeader","Address")),i().createElement("div",{style:{paddingBottom:"5%"}},t))};function Kt(e){var t=e.name,n=(0,s.useConfig)();if(!ue.X8.includes(t)&&!n.fieldDefinitions.some((function(e){return e.id==t})))return(0,s.reportError)("Invalid field name '".concat(t,"'. Valid options are '").concat(n.fieldDefinitions.map((function(e){return e.id})).concat(ue.X8).join("', '"),"'.")),null;switch(t){case"name":return i().createElement(Ee,null);case"gender":return i().createElement(De,null);case"dob":return i().createElement(At,null);case"address":return i().createElement(Jt,null);case"id":return i().createElement(ot,null);default:return i().createElement(kt,{name:t})}}var $t=function(e){var t=e.sectionDefinition;return i().createElement("section",{"aria-label":"".concat(t.name," Section")},t.fields.map((function(e){return i().createElement(Kt,{key:"".concat(t.name,"-").concat(e),name:e})})))};function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tn(){return tn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tn.apply(this,arguments)}function nn(e,t){if(e){if("string"==typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?en(e,t):void 0}}var rn=function(e){var t,n,r=e.name,a=e.options,s=e.label,l=e.required,c=(t=(0,_.U$)(r),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||nn(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],u=(0,d.useTranslation)().t,A=[i().createElement(o.QlF,{disabled:!0,hidden:!0,text:"Select ".concat(s),key:"",value:""})].concat(function(e){return function(e){if(Array.isArray(e))return en(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a.map((function(e,t){return i().createElement(o.QlF,{text:e,value:e,key:t})})))),m=l?s:"".concat(s," (").concat(u("optional","optional"),")");return i().createElement("div",{style:{marginBottom:"1rem"}},i().createElement(o.mh4,null,i().createElement(o.PhF,tn({id:"identifier"},c,{labelText:m}),A)))},an=n(713),on={};on.styleTagTransform=T(),on.setAttributes=O(),on.insert=k().bind(null,"head"),on.domAPI=w(),on.insertStyleElement=F(),y()(an.Z,on);const sn=an.Z&&an.Z.locals?an.Z.locals:void 0;var ln=function(){var e=i().useContext(C).values,t=(0,d.useTranslation)().t;return i().createElement("section",{className:sn.formSection,"aria-label":"Death Info Section"},i().createElement("h5",{className:"omrs-type-title-5 ".concat(sn.formSectionTitle)},"Death Info"),i().createElement("section",{className:sn.fieldGroup},i().createElement(fe,{labelText:t("isDeadInputLabel","Is Dead"),name:"isDead",id:"isDead"}),e.isDead&&i().createElement(i().Fragment,null,i().createElement(fe,{labelText:t("deathDateInputLabel","Date of Death"),name:"deathDate",id:"deathDate"}),i().createElement(rn,{options:[t("unknown","Unknown"),t("stroke","Stroke")],label:t("causeOfDeathInputLabel","Cause of Death"),name:"deathCause"}))))};function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var un=function(e){var t,n,a=e.fields,o=(t=(0,_.U$)("addNameInLocalLanguage"),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=o[0],l=o[1],c=(0,r.useContext)(C).setFieldValue;return(0,r.useEffect)((function(){!s.value&&l.touched&&(c("additionalGivenName",""),c("additionalMiddleName",""),c("additionalFamilyName",""))}),[s.value,l.touched]),i().createElement("section",{className:sn.formSection,"aria-label":"Demographics Section"},a.map((function(e){return i().createElement(Kt,{key:"demographics-".concat(e),name:e})})))},An=n(4301),dn={};dn.styleTagTransform=T(),dn.setAttributes=O(),dn.insert=k().bind(null,"head"),dn.domAPI=w(),dn.insertStyleElement=F(),y()(An.Z,dn);const _n=An.Z&&An.Z.locals?An.Z.locals:void 0;function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pn(){return pn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pn.apply(this,arguments)}var fn=function(e){var t,n,a=e.getDisplayValue,s=e.getFieldValue,l=e.getSearchResults,c=e.onSuggestionSelected,u=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,["getDisplayValue","getFieldValue","getSearchResults","onSuggestionSelected"]),A=(t=(0,r.useState)([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mn(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),_=A[0],m=A[1],p=(0,r.useRef)(null),f=(0,r.useRef)(null),g=((0,d.useTranslation)().t,u.name),C=u.labelText;(0,r.useEffect)((function(){return document.addEventListener("mousedown",h),function(){document.removeEventListener("mousedown",h)}}),[f]);var h=function(e){f.current&&!f.current.contains(e.target)&&m([])};return i().createElement("div",{className:_n.autocomplete,ref:f},i().createElement("label",{className:"cds--label"},C),i().createElement(o.mh4,null,i().createElement(o.olm,pn({id:"autosuggest",onChange:function(e){var t=e.target.value;t?l(t).then((function(e){m(e)})):m([])},ref:p,className:_n.autocompleteSearch},u))),_.length>0&&i().createElement("ul",{className:_n.suggestions},_.map((function(e,t){return i().createElement("li",{key:t,onClick:function(e){return function(e){var t=a(_[e]),n=s(_[e]);p.current.value=t,c(g,n),m([])}(t)}},a(e))}))))},gn=n(2429),Cn={};Cn.styleTagTransform=T(),Cn.setAttributes=O(),Cn.insert=k().bind(null,"head"),Cn.domAPI=w(),Cn.insertStyleElement=F(),y()(gn.Z,Cn);const hn=gn.Z&&gn.Z.locals?gn.Z.locals:void 0;function bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var En=function(e){var t,n,a,s=e.relationship,l=e.index,c=e.displayRelationshipTypes,u=e.remove,A=(0,d.useTranslation)().t,_=i().useContext(C).setFieldValue,m=!s.uuid,p=(0,r.useCallback)((function(e){var t=e.target,n=t.name,r=t.options[t.selectedIndex].value;_(n,r),(null==s?void 0:s.action)||_("relationships[".concat(l,"].action"),"UPDATE")}),[]),f=(0,r.useCallback)((function(e,t){_(e,t)}),[]),g=(t=function(e){return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,(function(t){switch(t.label){case 0:return new AbortController,[4,(0,h.M8)(e)];case 1:return[2,t.sent().data.results]}}))},n=function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function o(e){vn(a,r,i,o,s,"next",e)}function s(e){vn(a,r,i,o,s,"throw",e)}o(void 0)}))},function(e){return n.apply(this,arguments)}),b=(0,r.useCallback)((function(){"ADD"===s.action?u(l):_("relationships[".concat(l,"].action"),"DELETE")}),[s,l]),v=(0,r.useCallback)((function(){var e,t;_("relationships[".concat(l,"]"),(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){yn(e,t,n[t])}))}return e}({},s),t=null!=(t={action:void 0,relationshipType:s.initialrelationshipTypeValue})?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e))}),[l]);return"DELETE"!==s.action?i().createElement("div",{className:hn.relationship},i().createElement("div",{className:hn.searchBox},i().createElement("div",{className:hn.relationshipHeader},i().createElement("h4",{className:hn.productiveHeading},A("relationshipPlaceholder","Relationship")),i().createElement(o.zxk,{kind:"ghost",iconDescription:A("deleteRelationshipTooltipText","Delete"),hasIconOnly:!0,onClick:b},i().createElement(Ve.ZN,{size:16,className:hn.trashCan}))),i().createElement("div",null,m?i().createElement(fn,{name:"relationships[".concat(l,"].relatedPersonUuid"),labelText:A("relativeFullNameLabelText","Full name"),placeholder:A("relativeNamePlaceholder","Firstname Familyname"),defaultValue:s.relatedPersonName,onSuggestionSelected:f,getSearchResults:g,getDisplayValue:function(e){return e.display},getFieldValue:function(e){return e.uuid},required:!0}):i().createElement(i().Fragment,null,i().createElement("span",{className:hn.labelText},A("relativeFullNameLabelText","Full name")),i().createElement("p",{className:hn.bodyShort02},s.relatedPersonName)))),i().createElement("div",{className:"".concat(hn.selectRelationshipType),style:{marginBottom:"1rem"}},i().createElement(o.mh4,null,i().createElement(o.PhF,{id:"select",labelText:A("relationship","Relationship"),onChange:p,name:"relationships[".concat(l,"].relationshipType"),defaultValue:null!==(a=null==s?void 0:s.relationshipType)&&void 0!==a?a:"placeholder-item"},i().createElement(o.QlF,{disabled:!0,hidden:!0,value:"placeholder-item",text:A("relationshipToPatient","Relationship to patient")}),c.map((function(e,t){return i().createElement(o.QlF,{text:e.display,value:"".concat(e.uuid,"/").concat(e.direction),key:"relationship-".concat(e.uuid,"-").concat(t)})})))))):i().createElement(o.K0D,{kind:"info",title:A("relationshipRemovedText","Relationship removed"),actions:i().createElement(o.xho,{onClick:v},A("restoreRelationshipActionButton","Undo"))})},wn=function(){var e,t,n=(0,r.useContext)(l.Cg).relationshipTypes,a=(e=(0,r.useState)([]),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return bn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1],u=(0,d.useTranslation)().t;return(0,r.useEffect)((function(){if(n){var e=[];n.results.forEach((function(t){var n={display:t.displayAIsToB?t.displayAIsToB:t.aIsToB,uuid:t.uuid,direction:"aIsToB"},r={display:t.displayBIsToA?t.displayBIsToA:t.bIsToA,uuid:t.uuid,direction:"bIsToA"};n.display===r.display?e.push(n):e.push(n,r)})),c(e)}}),[n]),n?i().createElement("section",{"aria-label":"Relationships section"},i().createElement(_.F2,{name:"relationships"},(function(e){var t=e.push,n=e.remove,r=e.form.values.relationships;return i().createElement("div",null,r&&r.length>0?r.map((function(e,t){return i().createElement("div",{key:t,className:sn.formSection},i().createElement(En,{relationship:e,index:t,displayRelationshipTypes:s,key:t,remove:n}))})):null,i().createElement("div",{className:hn.actions},i().createElement(o.zxk,{kind:"ghost",onClick:function(){return t({relatedPersonUuid:"",action:"ADD"})}},u("addRelationshipButtonText","Add Relationship"))))}))):i().createElement("section",{"aria-label":"Loading relationships section"},i().createElement(o.N2B,{role:"progressbar"}))};function Dn(e){var t=e.sectionDefinition;switch(t.id){case"demographics":return i().createElement(un,{fields:t.fields});case"death":return i().createElement(ln,null);case"relationships":return i().createElement(wn,null);default:return i().createElement($t,{sectionDefinition:t})}}var kn=function(e){var t=e.sectionDefinition,n=e.index,r=(0,d.useTranslation)().t;return i().createElement("div",{id:t.id,style:{scrollMarginTop:"4rem"}},i().createElement("h3",{className:_e.productiveHeading02,style:{color:"#161616"}},n+1,". ",r("".concat(t.id,"Section"),t.name)),i().createElement("span",{className:_e.label01},r("allFieldsRequiredText","All fields are required unless marked optional")),i().createElement("div",{style:{margin:"1rem 0 1rem"}},i().createElement(o.n9L,null,i().createElement(Dn,{sectionDefinition:t}))))};function Bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function On(e){var t;return null===(t=e.split(window.getOpenmrsSpaBase()))||void 0===t?void 0:t[1]}const xn=function(e){var t,n,i=e.when,a=e.redirect,o=(0,d.useTranslation)().t,l=(0,r.useRef)(!1),c=(t=(0,r.useState)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Bn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bn(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],A=c[1],_=u||a,m=(0,r.useCallback)((function(e){var t=o("discardModalBody","The changes you made to this patient's details have not been saved. Discard changes?");return e.preventDefault(),e.returnValue=t,t}),[o]),p=(0,r.useCallback)((function(e){if(!e.detail.navigationIsCanceled&&!l.current){l.current=!0,e.detail.cancelNavigation();var t=(0,s.showModal)("cancel-patient-edit-modal",{onConfirm:function(){A(e.detail.newUrl),t()}},(function(){l.current=!1}))}}),[]);return(0,r.useEffect)((function(){if(i&&void 0===_)return window.addEventListener("single-spa:before-routing-event",p),window.addEventListener("beforeunload",m),function(){window.removeEventListener("beforeunload",m),window.removeEventListener("single-spa:before-routing-event",p)}}),[_,i,m,p]),(0,r.useEffect)((function(){"string"==typeof _&&(0,s.navigate)({to:"${openmrsSpaBase}/".concat(On(_))})}),[_]),null};var Fn=n(8928),Sn={};Sn.styleTagTransform=T(),Sn.setAttributes=O(),Sn.insert=k().bind(null,"head"),Sn.domAPI=w(),Sn.insertStyleElement=F(),y()(Fn.Z,Sn);const Tn=Fn.Z&&Fn.Z.locals?Fn.Z.locals:void 0;var In=[{name:"Kenya",initials:"KE"},{name:"Uganda",initials:"UG"},{name:"Tanzania",initials:"TZ"}],Nn=[{name:"National ID",value:"national-id"},{name:"Passport",value:"passport"},{name:"Birth certificate number",value:"birth-certificate-number"}],jn=n(3919);function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ln(e,t,n[t])}))}return e}function Mn(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Wn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const Rn=function(e){var t,n,a,l,c=e.props,u=(0,d.useTranslation)().t,A=(0,Y.AG)(),_=(A.data,A.isLoading),m=A.error,p=Wn((0,r.useState)({searchTerm:"",identifierType:""}),2),f=p[0],g=p[1],C=Wn((0,r.useState)(!1),2),h=C[0],b=C[1],v=(t=function(){var e;return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,(function(t){switch(t.label){case 0:b(!0),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,(0,Y.AW)(f.identifierType,f.searchTerm,c.values.token)];case 2:return e=t.sent(),b(!1),(0,jn.G)(e,c,f.searchTerm),[3,4];case 3:return t.sent(),(0,s.showToast)({title:"Client registry error",description:"Please reload the registration page and re-try again, if the issue persist contact system administrator",millis:1e4,kind:"error",critical:!0}),b(!1),[3,4];case 4:return[2]}}))},n=function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function o(e){Gn(a,r,i,o,s,"next",e)}function s(e){Gn(a,r,i,o,s,"throw",e)}o(void 0)}))},function(){return n.apply(this,arguments)});return m?i().createElement(o.n9L,{className:Tn.errorWrapper},i().createElement("p",null,"Error occurred while reaching the client registry, please proceed with registration and try again later")):i().createElement("div",{id:"patientVerification"},i().createElement("h3",{className:Tn.productiveHeading02,style:{color:"#161616"}},u("clientVerificationWithClientRegistry","Client verification with client registry")),i().createElement("div",{style:{margin:"1rem 0 1rem"}},i().createElement(o.mh4,null,_&&i().createElement(o.lSo,{status:"active",iconDescription:"Loading",description:"Loading data..."})),i().createElement(o.n9L,{className:Tn.verificationWrapper},i().createElement(o.mh4,null,i().createElement(o.CtY,{ariaLabel:u("selectCountry","Select country"),id:"selectCountry",items:In,itemToString:function(e){return null!==(a=null==e?void 0:e.name)&&void 0!==a?a:""},label:"Combo box menu options",titleText:u("selectCountry","Select country"),initialSelectedItem:In[0]})),i().createElement(o.mh4,null,i().createElement(o.CtY,{ariaLabel:u("selectIdentifierType","Select identifier type"),id:"selectIdentifierType",items:Nn,itemToString:function(e){return null!==(l=null==e?void 0:e.name)&&void 0!==l?l:""},label:"Combo box menu options",titleText:u("selectIdentifierType","Select identifier type"),onChange:function(e){var t=e.selectedItem;return g(Mn(Un({},f),{identifierType:t.value}))}})),i().createElement(o.mh4,null,i().createElement(o.olm,{id:"search-1",autoFocus:!0,placeHolderText:"Search",disabled:!f.identifierType,onChange:function(e){return g(Mn(Un({},f),{searchTerm:e.target.value}))}})),h?i().createElement(o.lSo,{status:"active",iconDescription:"Loading",description:"Searching client registry"}):i().createElement(o.zxk,{disabled:!f.identifierType&&!_,size:"md",onClick:v},u("validate","Validate")))))};function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Hn=function(e){var t,n,m,p=e.savePatientForm,f=e.isOffline,v=(0,r.useContext)(l.Cg),y=v.currentSession,E=(v.addressTemplate,v.identifierTypes),w=(0,a.useLocation)().search,D=(0,s.useConfig)(),k=Vn((0,r.useState)(),2),B=k[0],O=k[1],x=Vn((0,r.useState)(g),2),F=x[0],S=x[1],T=(0,a.useParams)().patientUuid,I=(0,s.usePatient)(T),N=I.isLoading,j=I.patient,P=(0,d.useTranslation)().t,X=Vn((0,r.useState)(null),2),Q=X[0],K=X[1],ae=Vn(function(e){var t=function(){var e=(0,Y.Bx)("1054AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"),t=e.data,n=e.isLoading,r=(0,Y.Bx)("1712AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");return{martialStatus:t,education:r.data,occupation:[{uuid:"1538AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",display:"Farmer"},{uuid:"1540AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",display:"Employee"},{uuid:"1539AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",display:"Trader"},{uuid:"159465AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",display:"Student"},{uuid:"159466AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",display:"Driver"},{uuid:"1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",display:"None"},{uuid:"5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",display:"Other"}],loadingStatus:n,educationLoad:r.isLoading}}(),n=t.martialStatus,i=t.education,a=t.occupation,o=t.educationLoad,l=t.loadingStatus,c=(0,s.usePatient)(e),u=c.isLoading,A=c.patient,d=ce(e),_=d.data,m=d.isLoading,p=function(e){var t=!!e,n=(0,V.ZP)(t?"/ws/rest/v1/patient/".concat(e,"/identifier?v=custom:(uuid,identifier,identifierType:(uuid,required,name),preferred)"):null,s.openmrsFetch),i=n.data,a=n.error,o=n.isLoading,l=(0,r.useMemo)((function(){var e,t,n={};return null==i||null===(e=i.data)||void 0===e||null===(t=e.results)||void 0===t||t.forEach((function(e){n[(0,L.Z)(e.identifierType.name)]={identifierUuid:e.uuid,preferred:e.preferred,initialValue:e.identifier,identifierValue:e.identifier,identifierTypeUuid:e.identifierType.uuid,identifierName:e.identifierType.name,required:e.identifierType.required,selectedSource:null,autoGeneration:!1}})),{data:n,isLoading:o}}),[i,a]);return l}(e),f=p.data,g=p.isLoading,C=function(e){var t=!!e,n=(0,V.ZP)(t?"/ws/rest/v1/relationship?v=".concat(H.UO,"&person=").concat(e):null,s.openmrsFetch),i=n.data,a=n.error,o=n.isLoading,l=(0,r.useMemo)((function(){var t;return{data:null==i||null===(t=i.data)||void 0===t?void 0:t.results.map((function(t){return t.personA.uuid===e?{relatedPersonName:t.personB.display,relatedPersonUuid:t.personB.uuid,relation:t.relationshipType.bIsToA,relationshipType:"".concat(t.relationshipType.uuid,"/bIsToA"),initialrelationshipTypeValue:"".concat(t.relationshipType.uuid,"/bIsToA"),uuid:t.uuid}:{relatedPersonName:t.personA.display,relatedPersonUuid:t.personA.uuid,relation:t.relationshipType.aIsToB,relationshipType:"".concat(t.relationshipType.uuid,"/aIsToB"),initialrelationshipTypeValue:"".concat(t.relationshipType.uuid,"/aIsToB"),uuid:t.uuid}})),error:a,isLoading:o}}),[e,i,a]);return l}(e),h=C.data,v=C.isLoading,y=function(e){var t,n,r,i=(0,s.useConfig)().registrationObs.encounterTypeUuid,a="/ws/rest/v1/encounter?patient=".concat(e,"&encounterType=").concat(i,"&v=custom:(obs:(uuid,display,concept:(uuid,display),value:(uuid,display)))"),o=(0,V.ZP)(e?a:null,s.openmrsFetch),l=o.data,c=o.isLoading,u=o.error,A={};return null===(n=(0,z.Z)(null==l||null===(t=l.data)||void 0===t?void 0:t.results))||void 0===n||null===(r=n.obs)||void 0===r||r.forEach((function(e){Object.assign(A,ee({},e.concept.uuid,e.value.uuid))})),{data:A,isLoading:c,error:u,obs:null==l?void 0:l.data}}(e),E=y.data,w=y.isLoading,D=y.obs,k=(0,Y.AG)(),B=k.data,O=k.isLoading,x=re((0,r.useState)({patientUuid:(0,b.Z)(),givenName:"",middleName:"",familyName:"",additionalGivenName:"",additionalMiddleName:"",additionalFamilyName:"",addNameInLocalLanguage:!1,gender:"",birthdate:null,yearsEstimated:0,monthsEstimated:0,birthdateEstimated:!1,telephoneNumber:"",isDead:!1,deathDate:"",deathCause:"",relationships:[],identifiers:{},address:{}}),2),F=x[0],S=x[1];return(0,r.useEffect)((function(){$((function(){var t,n,r,i,a,o;return oe(this,(function(l){switch(l.label){case 0:return A?(t=!/^\d{4}-\d{2}-\d{2}$/.test(A.birthDate),(n=re(A.birthDate.split("-").map((function(e){return parseInt(e)})),2))[0],n[1],r=A.birthDate.split("-").length>1,i=t?Math.floor(J()().diff(A.birthDate,"month")/12):0,a=t&&r?J()().diff(A.birthDate,"month")%12:0,S(ne(te(ne(te({},F,(d={},_=(c=A).name[0],m=c.name[1],d.patientUuid=c.id,d.givenName=null==_?void 0:_.given[0],d.middleName=null==_?void 0:_.given[1],d.familyName=null==_?void 0:_.family,d.addNameInLocalLanguage=!!m||void 0,d.additionalGivenName=null==m?void 0:m.given[0],d.additionalMiddleName=null==m?void 0:m.given[1],d.additionalFamilyName=null==m?void 0:m.family,d.gender=(0,U.Z)(c.gender),d.birthdate=c.birthDate?(0,s.parseDate)(c.birthDate):void 0,d.telephoneNumber=c.telecom?c.telecom[0].value:"",(c.deceasedBoolean||c.deceasedDateTime)&&(d.isDead=!0,d.deathDate=c.deceasedDateTime?c.deceasedDateTime.split("T")[0]:""),R({},d,c.identifier.map((function(e){return W({},(0,L.Z)(e.system||e.type.text),e.value)}))))),{address:Z(A)}),function(e){var t={};return e.telecom&&(t.phone=e.telecom[0].value),t}(A)),{birthdateEstimated:!/^\d{4}-\d{2}-\d{2}$/.test(A.birthDate),yearsEstimated:i,monthsEstimated:a})),[3,3]):[3,1];case 1:return u||!e?[3,3]:[4,se(e)];case 2:if(!(o=l.sent())._patientRegistrationData.formValues)return console.error("Found a queued offline patient registration for patient ".concat(e,", but without form values. Not using these values.")),[2];S(o._patientRegistrationData.formValues),l.label=3;case 3:return[2]}var c,d,_,m}))}))()}),[u,A,e]),(0,r.useEffect)((function(){!O&&B&&S((function(e){return ne(te({},e),{token:String(B.access_token)})}))}),[O,B]),(0,r.useEffect)((function(){!v&&h&&S((function(e){return ne(te({},e),{relationships:h})}))}),[v,h,S]),(0,r.useEffect)((function(){!g&&f&&S((function(e){return ne(te({},e),{identifiers:f})}))}),[g,f,S]),(0,r.useEffect)((function(){if(!m&&_){var e={};_.forEach((function(t){var n;e[t.attributeType.uuid]="org.openmrs.Concept"===t.attributeType.format&&"object"==typeof t.value?null===(n=t.value)||void 0===n?void 0:n.uuid:t.value})),S((function(t){return ne(te({},t),{attributes:e})}))}}),[_,S,m]),(0,r.useEffect)((function(){w||S((function(e){return ne(te({},e),{obs:E,observation:D})}))}),[w]),(0,r.useEffect)((function(){o&&l||S((function(e){return ne(te({},e),{concepts:ie(a).concat(ie(n),ie(i))})}))}),[o,l]),[F,S]}(T),2),le=ae[0],Ae=ae[1],de=Vn(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,s.usePatient)(e),i=n.isLoading,a=n.patient,o=re((0,r.useState)(t),2),l=o[0],c=o[1];return(0,r.useEffect)((function(){$((function(){var n,r;return oe(this,(function(o){switch(o.label){case 0:return a?(c(ne(te({},l),{address:Z(a)})),[3,3]):[3,1];case 1:return i||!e?[3,3]:[4,se(e)];case 2:n=o.sent(),c(null!==(r=null==n?void 0:n._patientRegistrationData.initialAddressFieldValues)&&void 0!==r?r:t),o.label=3;case 3:return[2]}}))}))()}),[i,a,e]),[l,c]}(T),1),me=de[0],pe=Vn(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,s.usePatient)(e),i=n.isLoading,a=n.patient,o=ce(e).data,l=re((0,r.useState)(t),2),c=l[0],u=l[1];return(0,r.useEffect)((function(){if(a)u(te({},c,function(e){var t,n=e.name[0],r=e.name[1],i=null===(t=e.address)||void 0===t?void 0:t[0];return R({preferredNameUuid:null==n?void 0:n.id,additionalNameUuid:null==r?void 0:r.id,preferredAddressUuid:null==i?void 0:i.id},e.identifier.map((function(e){return W({},(0,L.Z)(e.system||e.type.text),{uuid:e.id,value:e.value})})))}(a)));else if(!i&&e){var n;se(e).then((function(e){return u(null!==(n=null==e?void 0:e._patientRegistrationData.initialAddressFieldValues)&&void 0!==n?n:t)}))}}),[i,a,e]),(0,r.useEffect)((function(){o&&u((function(e){return te({},e,function(e){var t={};return e.forEach((function(e){var n;t["attribute.".concat(null==e||null===(n=e.attributeType)||void 0===n?void 0:n.uuid)]=null==e?void 0:e.uuid})),t}(o))}))}),[o]),[c,u]}(T),1)[0],fe=null==y||null===(t=y.sessionLocation)||void 0===t?void 0:t.uuid,ge=N?void 0:!(!T||!j),Ce=(0,r.useMemo)((function(){return"true"===localStorage.getItem("openmrs:devtools")&&!ge}),[ge]),he=(0,h.Uu)(null==j?void 0:j.id).data,be=(0,r.useRef)(new c.I),ve=(null==D||null===(n=D.fieldDefinitions)||void 0===n||n.filter((function(e){return"address"===e.type})),Vn((0,r.useState)(!!ge&&(null===(m=le.identifiers.nationalUniquePatientIdentifier)||void 0===m?void 0:m.identifierValue)),2)),ye=ve[0],Ee=ve[1];(0,r.useEffect)((function(){}),[le]);var we,De,ke=(0,r.useMemo)((function(){var e;return D.sections.map((function(t){return null!==(e=D.sectionDefinitions.filter((function(e){return e.id==t}))[0])&&void 0!==e?e:ue.bs.filter((function(e){return e.id==t}))[0]})).filter((function(e){return e}))}),[D.sections,D.sectionDefinitions]),Be=(we=function(e,t){var n,r,i,a,o,l,c,u,A;return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,(function(d){switch(d.label){case 0:n=new AbortController,t.setSubmitting(!0),r=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){zn(e,t,n[t])}))}return e}({},e),{identifiers:(_=e.identifiers,Object.fromEntries(Object.entries(_).filter((function(e){var t,n,r=(n=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(t,n)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return r[0],void 0!==r[1].identifierValue}))))}),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,p(!ge,r,pe,me,Q,fe,le.identifiers,y,D,be.current,n)];case 2:return d.sent(),(0,s.showToast)({description:ge?P("updationSuccessToastDescription","The patient's information has been successfully updated"):P("registrationSuccessToastDescription","The patient can now be found by searching for them using their name or ID number"),title:ge?P("updationSuccessToastTitle","Patient Details Updated"):P("registrationSuccessToastTitle","New Patient Created"),kind:"success"}),i=new URLSearchParams(w).get("afterUrl"),a=(0,s.interpolateUrl)(i||D.links.submitButton,{patientUuid:e.patientUuid}),O(a),[3,4];case 3:return o=d.sent(),(null===(l=o.responseBody)||void 0===l||null===(c=l.error)||void 0===c?void 0:c.globalErrors)?o.responseBody.error.globalErrors.forEach((function(e){(0,s.showToast)({description:e.message})})):(null===(u=o.responseBody)||void 0===u||null===(A=u.error)||void 0===A?void 0:A.message)?(0,s.showToast)({description:o.responseBody.error.message}):(0,s.createErrorHandler)()(o),t.setSubmitting(!1),[3,4];case 4:return[2]}var _}))},De=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=we.apply(e,t);function a(e){Zn(i,n,r,a,o,"next",e)}function o(e){Zn(i,n,r,a,o,"throw",e)}a(void 0)}))},function(e,t){return De.apply(this,arguments)}),Oe=function(e){return i().createElement("div",null,i().createElement("p",null,P("fieldErrorTitleMessage","The following fields have errors:")),i().createElement("ul",{style:{listStyle:"inside"}},Object.keys(e).map((function(e,t){return i().createElement("li",{key:t},P("".concat(e,"LabelText"),e))}))))},xe=function(e){e&&"object"==typeof e&&Object.keys(e).length&&(0,s.showToast)({description:Oe(e),title:P("incompleteForm","Incomplete form"),kind:"warning"})};return i().createElement(_.J9,{enableReinitialize:!0,initialValues:le,validationSchema:F,onSubmit:Be},(function(e){return i().createElement(_.l0,{className:_e.form},i().createElement(xn,{when:e.dirty,redirect:B}),i().createElement("div",{className:_e.formContainer},i().createElement("div",null,i().createElement("div",{className:_e.stickyColumn},i().createElement("h4",null,ge?P("edit","Edit"):P("createNew","Create New")," ",P("patient","Patient")),Ce&&i().createElement(G,{setValues:e.setValues}),i().createElement("p",{className:_e.label01},P("jumpTo","Jump to")),ke.map((function(e){return i().createElement("div",{className:"".concat(_e.space05," ").concat(_e.touchTarget),key:e.name},i().createElement(o.rUS,{className:_e.linkName,onClick:function(){return t=e.id,void document.getElementById(t).scrollIntoView({behavior:"smooth",block:"center",inline:"center"});var t}},i().createElement(u.Kc,{size:16})," ",P("".concat(e.id,"Section"),e.name)))})),i().createElement(o.zxk,{renderIcon:A.r,disabled:!y||!E,onClick:function(){Ee(!0),e.isValid?(0,Y.b7)(e.values,e.setValues,ge):e.validateForm().then((function(e){return xe(e)}))},className:_e.submitButton},P("postToRegistry","Post to registry")),i().createElement(o.zxk,{className:_e.submitButton,type:"submit",onClick:function(){return e.validateForm().then((function(e){return xe(e)}))},disabled:!ye},ge?P("updatePatient","Update Patient"):P("registerPatient","Register Patient")),i().createElement(o.zxk,{className:_e.cancelButton,kind:"tertiary",onClick:q},P("cancel","Cancel")))),i().createElement("div",{className:_e.infoGrid},i().createElement(C.Provider,{value:{identifierTypes:E,validationSchema:F,setValidationSchema:S,values:e.values,inEditMode:ge,setFieldValue:e.setFieldValue,setCapturePhotoProps:K,currentPhoto:null==he?void 0:he.imageSrc,isOffline:f,initialFormValues:e.initialValues,setInitialFormValues:Ae}},i().createElement(Rn,{props:e}),ke.map((function(e,t){return i().createElement(kn,{key:"registration-section-".concat(e.id),sectionDefinition:e,index:t})}))))))}))},Yn=n(1234),Xn={};Xn.styleTagTransform=T(),Xn.setAttributes=O(),Xn.insert=k().bind(null,"head"),Xn.domAPI=w(),Xn.insertStyleElement=F(),y()(Yn.Z,Xn);const Jn=Yn.Z&&Yn.Z.locals?Yn.Z.locals:void 0;function Qn(){var e=(0,s.useConnectivity)(),t=(0,s.useSession)(),n=(0,mt.Z)("patientRegistrationAddressTemplate",l.Te).data,u=(0,mt.Z)("patientRegistrationRelationshipTypes",l.mt).data,A=(0,mt.Z)("patientRegistrationPatientIdentifiers",l.St).data,d=(0,r.useMemo)((function(){return e?c.y.savePatientFormOnline:c.y.savePatientFormOffline}),[e]);return i().createElement("main",{className:"omrs-main-content ".concat(Jn.root)},i().createElement(o.rjZ,{className:Jn.grid},i().createElement(o.X2j,null,i().createElement(s.ExtensionSlot,{name:"breadcrumbs-slot"})),i().createElement(l.Cg.Provider,{value:{addressTemplate:n,relationshipTypes:u,identifierTypes:A,currentSession:t}},i().createElement(a.BrowserRouter,{basename:window.getOpenmrsSpaBase()},i().createElement(a.Routes,null,i().createElement(a.Route,{path:"patient-registration",element:i().createElement(Hn,{savePatientForm:d,isOffline:!e})}),i().createElement(a.Route,{path:"patient/:patientUuid/edit",element:i().createElement(Hn,{savePatientForm:d,isOffline:!e})}))))))}}}]);
|