@openmrs/esm-patient-immunizations-app 9.2.3-pre.7449 → 9.2.3-pre.7451
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/.turbo/turbo-build.log +1 -1
- package/dist/2146.js +1 -1
- package/dist/915.js +1 -1
- package/dist/main.js +1 -1
- package/dist/openmrs-esm-patient-immunizations-app.js +1 -1
- package/dist/openmrs-esm-patient-immunizations-app.js.buildmanifest.json +4 -4
- package/dist/routes.json +1 -1
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
package/dist/2146.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_immunizations_app=globalThis.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[2146],{
|
|
1
|
+
"use strict";(globalThis.webpackChunk_openmrs_esm_patient_immunizations_app=globalThis.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[2146],{9765:e=>{e.exports=JSON.parse('{"add":"Add","addImmunizations":"Add immunizations","AM":"AM","cancel":"Cancel","doseNumber":"Dose number within series","doseNumberWithinSeries":"Dose number within series","error":"Error","errorSaving":"Error saving vaccination","expirationDate":"Expiration Date","goToSummary":"Go to Summary","immunization":"Immunization","immunizations":"Immunizations","Immunizations":"Immunizations","immunizations__lower":"immunizations","immunizationWorkspaceTitle":"Immunization Form","lotNumber":"Lot Number","manufacturer":"Manufacturer","pleaseSelect":"Please select","PM":"PM","recentVaccination":"Recent vaccination","save":"Save","seeAll":"See all","sequence":"Sequence","singleDoseOn":"Single Dose on","time":"Time","timeFormat ":"Time Format","vaccinationDate":"Vaccination date","vaccinationDateRequired":"Vaccination date required","vaccinationSaved":"Vaccination saved successfully","vaccine":"Vaccine","vaccineRequired":"Vaccine required"}')}}]);
|
package/dist/915.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.webpackChunk_openmrs_esm_patient_immunizations_app=globalThis.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[915],{3905:(e,n,t)=>{"use strict";t.d(n,{A:()=>c});var r=t(977),a=t.n(r),i=t(5924),o=t.n(i)()(a());o.push([e.id,".-esm-patient-immunizations__immunizations-sequence-table__tableCell___wKcW5{padding:0 1.5rem !important}.-esm-patient-immunizations__immunizations-sequence-table__sequenceTable___-UEob{margin:.5rem 0}","",{version:3,sources:["webpack://./src/immunizations/components/immunizations-sequence-table.scss"],names:[],mappings:"AAEA,6EACE,2BAAA,CAGF,iFACE,cAAA",sourcesContent:["@use '@carbon/layout';\n\n.tableCell {\n padding: 0 layout.$spacing-06 !important;\n}\n\n.sequenceTable {\n margin: layout.$spacing-03 0;\n}\n"],sourceRoot:""}]),o.locals={tableCell:"-esm-patient-immunizations__immunizations-sequence-table__tableCell___wKcW5",sequenceTable:"-esm-patient-immunizations__immunizations-sequence-table__sequenceTable___-UEob"};const c=o},8241:(e,n,t)=>{"use strict";t.d(n,{A:()=>c});var r=t(977),a=t.n(r),i=t(5924),o=t.n(i)()(a());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-immunizations__immunizations-detailed-summary__widgetCard___qFFJo{border:1px solid #e0e0e0;background-color:#fff}.-esm-patient-immunizations__immunizations-detailed-summary__hiddenRow___9yEg8{display:none}.-esm-patient-immunizations__immunizations-detailed-summary__paginationContainer___UsPke>div{border-top:none !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/immunizations/immunizations-detailed-summary.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC3DF,gFACE,wBAAA,CACA,qBDDM,CCIR,+EACE,YAAA,CAIA,6FACE,0BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.widgetCard {\n border: 1px solid $ui-03;\n background-color: $ui-02;\n}\n\n.hiddenRow {\n display: none;\n}\n\n.paginationContainer {\n > div {\n border-top: none !important;\n }\n}\n"],sourceRoot:""}]),o.locals={widgetCard:"-esm-patient-immunizations__immunizations-detailed-summary__widgetCard___qFFJo",hiddenRow:"-esm-patient-immunizations__immunizations-detailed-summary__hiddenRow___9yEg8",paginationContainer:"-esm-patient-immunizations__immunizations-detailed-summary__paginationContainer___UsPke"};const c=o},3995:(e,n,t)=>{"use strict";t.d(n,{A:()=>c});var r=t(977),a=t.n(r),i=t(5924),o=t.n(i)()(a());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-immunizations__immunizations-overview__widgetCard___-dZJa{border:1px solid #e0e0e0}.-esm-patient-immunizations__immunizations-overview__immunizationOverviewSummaryCard___FnG1n{margin:1.25rem 1.5rem}.-esm-patient-immunizations__immunizations-overview__immunizationMore___Xd5Aa{display:flex;align-items:center;border:none;padding:.625rem 1.625rem .625rem 1rem;background-color:var(--omrs-color-bg-medium-contrast);color:var(--omrs-color-ink-medium-contrast);cursor:pointer}.-esm-patient-immunizations__immunizations-overview__immunizationMore___Xd5Aa p{margin:0}.-esm-patient-immunizations__immunizations-overview__paginationContainer___XNZP8>div{border-top:none !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/immunizations/immunizations-overview.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DF,wEACE,wBAAA,CAGF,6FACE,qBAAA,CAGF,8EACE,YAAA,CACA,kBAAA,CACA,WAAA,CACA,qCAAA,CACA,qDAAA,CACA,2CAAA,CACA,cAAA,CAGF,gFACE,QAAA,CAIA,qFACE,0BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.widgetCard {\n border: 1px solid $ui-03;\n}\n\n.immunizationOverviewSummaryCard {\n margin: 1.25rem layout.$spacing-06;\n}\n\n.immunizationMore {\n display: flex;\n align-items: center;\n border: none;\n padding: 0.625rem 1.625rem 0.625rem layout.$spacing-05;\n background-color: var(--omrs-color-bg-medium-contrast);\n color: var(--omrs-color-ink-medium-contrast);\n cursor: pointer;\n}\n\n.immunizationMore p {\n margin: 0;\n}\n\n.paginationContainer {\n > div {\n border-top: none !important;\n }\n}\n"],sourceRoot:""}]),o.locals={widgetCard:"-esm-patient-immunizations__immunizations-overview__widgetCard___-dZJa",immunizationOverviewSummaryCard:"-esm-patient-immunizations__immunizations-overview__immunizationOverviewSummaryCard___FnG1n",immunizationMore:"-esm-patient-immunizations__immunizations-overview__immunizationMore___Xd5Aa",paginationContainer:"-esm-patient-immunizations__immunizations-overview__paginationContainer___XNZP8"};const c=o},4559:(e,n,t)=>{"use strict";t.d(n,{v:()=>o});var r=t(8254),a=t(1123),i=t(5650);function o(e){var n="".concat(r.fhirBaseUrl,"/Immunization?patient=").concat(e),t=(0,a.Ay)(n,r.openmrsFetch),o=t.data,c=t.error,s=t.isLoading,u=t.isValidating,l=t.mutate;return{data:o?(0,i.q)(o.data):null,error:c,isLoading:s,isValidating:u,mutate:l}}},5650:(e,n,t)=>{"use strict";t.d(n,{D:()=>p,q:()=>m});var r=t(6621),a=t(385),i=t(8491),o=t(4501),c=t(4683),s=t(7499),u=function(e){var n,t,r,a=null==e?void 0:e.resource,i=null==a?void 0:a.id,o=null==a||null===(n=a.manufacturer)||void 0===n?void 0:n.display,c=null==a?void 0:a.lotNumber,s=(null==a||null===(t=a.protocolApplied)||void 0===t?void 0:t.length)>0&&(null==a?void 0:a.protocolApplied[0]);return{immunizationObsUuid:i,manufacturer:o,lotNumber:c,doseNumber:null==s?void 0:s.doseNumberPositiveInt,occurrenceDateTime:null==a?void 0:a.occurrenceDateTime,expirationDate:null==a?void 0:a.expirationDate,visitUuid:(r=null==a?void 0:a.encounter,r.reference.split("/")[1])}},l=function(e){var n;return(0,r.A)(null==e||null===(n=e.vaccineCode)||void 0===n?void 0:n.coding,(function(e){return(0,o.A)(e.system)}))},m=function(e){var n=(0,i.A)(e.entry,(function(e){var n;return null===(n=l(e.resource))||void 0===n?void 0:n.code}));return(0,c.A)(n,(function(e){var n,t=(0,c.A)(e,u),r=l(null===(n=e[0])||void 0===n?void 0:n.resource);return{vaccineName:null==r?void 0:r.display,vaccineUuid:null==r?void 0:r.code,existingDoses:(0,s.A)(t,[function(e){return(0,a.A)(e,"occurrenceDateTime")}],["desc"])}}))};function d(e,n){return{type:e,reference:"".concat(e,"/").concat(n)}}var p=function(e,n,t,r){return{resourceType:"Immunization",status:"completed",id:e.immunizationId,vaccineCode:{coding:[{code:e.vaccineUuid,display:e.vaccineName}]},patient:d("Patient",e.patientUuid),encounter:d("Encounter",n),occurrenceDateTime:e.vaccinationDate,expirationDate:e.expirationDate,location:d("Location",t),performer:[{actor:d("Practitioner",r)}],manufacturer:{display:e.manufacturer},lotNumber:e.lotNumber,protocolApplied:[{doseNumberPositiveInt:e.doseNumber,series:null}]}}},2219:(e,n,t)=>{"use strict";t.d(n,{RA:()=>i,xS:()=>o,yM:()=>c});var r=t(4683),a=t(6621),i=new(t(3214).BehaviorSubject)(null),o=function(e,n){return(0,r.A)(e,(function(e){var t=(0,a.A)(n,(function(n){return n.vaccineConceptUuid===e.vaccineUuid}));return e.sequences=(null==t?void 0:t.sequences)||[],e}))},c=function(e,n){return new Date(n.occurrenceDateTime).getTime()-new Date(e.occurrenceDateTime).getTime()}},915:(e,n,t)=>{"use strict";t.r(n),t.d(n,{immunizationFormWorkspace:()=>ne,immunizationsDashboardLink:()=>ee,immunizationsDetailedSummary:()=>Q,immunizationsOverview:()=>Y,importTranslation:()=>Z,startupApp:()=>X});var r=t(8254),a=t(7223),i={immunizationsConfig:{immunizationConceptSet:{_type:r.Type.String,_default:"CIEL:984",_description:"A uuid or concept mapping which will have all the possible vaccines as set-members."},sequenceDefinitions:{_type:r.Type.Array,_description:"Doses/Schedules definitions for each vaccine configured if applicable. If not provided the vaccine would be treated as a vaccine without schedules",_elements:{vaccineConceptUuid:{_type:r.Type.UUID,_description:"The UUID of the individual vaccine concept"},sequences:{_type:r.Type.Array,_elements:{sequenceLabel:{_type:r.Type.String,_description:"Name of the dose/booster/schedule.. This will be used as a translation key as well."},sequenceNumber:{_type:r.Type.Number,_description:"The dose number in the vaccines. Convention for doses is [1...9] and for boosters is [11...19]"}}}},_default:[{vaccineConceptUuid:"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",sequences:[{sequenceLabel:"Dose-1",sequenceNumber:1},{sequenceLabel:"Dose-2",sequenceNumber:2},{sequenceLabel:"Dose-3",sequenceNumber:3},{sequenceLabel:"Dose-4",sequenceNumber:4},{sequenceLabel:"Booster-1",sequenceNumber:11},{sequenceLabel:"Booster-2",sequenceNumber:12}]}]}}},o=t(1343),c=t.n(o),s=t(3373),u=t.n(s),l=t(3150),m=t(997),d=t(4559),p=t(506),b=t.n(p),v=t(9867),A=t.n(v),f=t(105),g=t.n(f),y=t(7154),h=t.n(y),_=t(5326),w=t.n(_),C=t(7763),k=t.n(C),$=t(3995),z={};z.styleTagTransform=k(),z.setAttributes=h(),z.insert=g().bind(null,"head"),z.domAPI=A(),z.insertStyleElement=w(),b()($.A,z);const E=$.A&&$.A.locals?$.A.locals:void 0;function D(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){D(e,n,t[n])}))}return e}var j=t(7499),P=t(385),x=t(9915),T=t(2219),N=t(5992),S=t(3905),q={};q.styleTagTransform=k(),q.setAttributes=h(),q.insert=g().bind(null,"head"),q.domAPI=A(),q.insertStyleElement=w(),b()(S.A,q);const I=S.A&&S.A.locals?S.A.locals:void 0;function U(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const F=function(e){var n=e.immunizationsByVaccine,t=e.launchPatientImmunizationForm,a=(0,l.useTranslation)().t,i=n.existingDoses,s=n.sequences,u=n.vaccineUuid,d=(0,o.useMemo)((function(){return[{key:"sequence",header:s.length?a("sequence","Sequence"):a("doseNumber","Dose number")},{key:"vaccinationDate",header:a("vaccinationDate","Vaccination date")},{key:"expirationDate",header:a("expirationDate","Expiration date")},{key:"edit",header:""}]}),[a,s.length]),p=null==i?void 0:i.map((function(e){return{id:null==e?void 0:e.immunizationObsUuid,sequence:(0,N.A)(s)?e.doseNumber||0:(null==s?void 0:s.find((function(n){return n.sequenceNumber===e.doseNumber})).sequenceLabel)||e.doseNumber,vaccinationDate:(null==e?void 0:e.occurrenceDateTime)&&(0,r.formatDate)((0,r.parseDate)(e.occurrenceDateTime),{noToday:!0}),expirationDate:(null==e?void 0:e.expirationDate)&&(0,r.formatDate)((0,r.parseDate)(e.expirationDate),{noToday:!0}),edit:c().createElement(m.$nd,{kind:"ghost",iconDescription:(0,r.getCoreTranslation)("edit","Edit"),renderIcon:function(e){return c().createElement(r.EditIcon,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){U(e,n,t[n])}))}return e}({size:16},e))},onClick:function(){T.RA.next({vaccineUuid:u,immunizationId:e.immunizationObsUuid,vaccinationDate:e.occurrenceDateTime&&(0,r.parseDate)(e.occurrenceDateTime),doseNumber:e.doseNumber,expirationDate:e.expirationDate&&(0,r.parseDate)(e.expirationDate),lotNumber:e.lotNumber,manufacturer:e.manufacturer,visitId:e.visitUuid}),t()}},(0,r.getCoreTranslation)("edit","Edit"))}}));return p.length>0&&c().createElement(m.bQt,{rows:p,headers:d,useZebraStyles:!0},(function(e){var n=e.rows,t=e.headers,r=e.getHeaderProps,a=e.getTableProps;return c().createElement(m.K3K,{className:I.sequenceTable},c().createElement(m.XIK,a(),c().createElement(m.ndF,null,c().createElement(m.Hjg,null,t.map((function(e){return c().createElement(m.A0N,r({header:e}),e.header)})))),c().createElement(m.BFY,null,n.map((function(e){return c().createElement(m.Hjg,{key:e.id},e.cells.map((function(e){return c().createElement(m.nA6,{key:null==e?void 0:e.id,className:I.tableCell},null==e?void 0:e.value)})))})))))}))};var B=t(8241),L={};L.styleTagTransform=k(),L.setAttributes=h(),L.insert=g().bind(null,"head"),L.domAPI=A(),L.insertStyleElement=w(),b()(B.A,L);const R=B.A&&B.A.locals?B.A.locals:void 0;function M(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){M(e,n,t[n])}))}return e}function H(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var K="@openmrs/esm-patient-immunizations-app",G={featureName:"patient-immunizations",moduleName:K},Z=t(4767);function X(){(0,r.defineConfigSchema)(K,i)}var J,W,Y=(0,r.getSyncLifecycle)((function(e){e.patient;var n=e.patientUuid,t=e.basePath,i=(0,l.useTranslation)().t,o=i("immunizations__lower","immunizations"),s=i("immunizations","Immunizations"),p=i("seeAll","See all"),b=window.spaBase+t+"/immunizations",v=(0,d.v)(n),A=v.data,f=v.error,g=v.isLoading,y=v.isValidating,h=(0,r.usePagination)(null!=A?A:[],5),_=h.results,w=h.goTo,C=h.currentPage,k=c().useCallback((function(){return(0,a.launchPatientWorkspace)("immunization-form-workspace")}),[]),$=[{key:"vaccineName",header:i("recentVaccination","Recent vaccination")},{key:"vaccinationDate",header:i("vaccinationDate","Vaccination date")}],z=c().useMemo((function(){return null==_?void 0:_.map((function(e,n){return function(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}(O({},e),{id:"".concat(n),vaccineName:e.vaccineName,vaccinationDate:"".concat((0,r.formatDate)((0,r.parseDate)(e.existingDoses[0].occurrenceDateTime),{day:!1,time:!1}))})}))}),[_]);return g?c().createElement(m.OOb,{role:"progressbar"}):f?c().createElement(a.ErrorState,{error:f,headerTitle:s}):(null==A?void 0:A.length)?c().createElement("div",{className:E.widgetCard},c().createElement(a.CardHeader,{title:s},c().createElement("span",null,y?c().createElement(m.OuH,null):null),c().createElement(m.$nd,{kind:"ghost",renderIcon:function(e){return c().createElement(r.AddIcon,O({size:16},e))},iconDescription:"Add immunizations",onClick:k},i("add","Add"))),c().createElement(m.bQt,{headers:$,rows:z,isSortable:!0,size:"sm",useZebraStyles:!0},(function(e){var n=e.rows,t=e.headers,r=e.getHeaderProps,a=e.getTableProps;return c().createElement(m.K3K,null,c().createElement(m.XIK,a(),c().createElement(m.ndF,null,c().createElement(m.Hjg,null,t.map((function(e){var n,t;return c().createElement(m.A0N,O({className:u()(E.productiveHeading01,E.text02)},r({header:e,isSortable:e.isSortable})),null!==(t=null===(n=e.header)||void 0===n?void 0:n.content)&&void 0!==t?t:e.header)})))),c().createElement(m.BFY,null,n.map((function(e){return c().createElement(m.Hjg,{key:e.id},e.cells.map((function(e){var n,t;return c().createElement(m.nA6,{key:e.id},null!==(t=null===(n=e.value)||void 0===n?void 0:n.content)&&void 0!==t?t:e.value)})))})))))})),c().createElement("div",{className:E.paginationContainer},c().createElement(a.PatientChartPagination,{currentItems:_.length,onPageNumberChange:function(e){var n=e.page;return w(n)},pageNumber:C,pageSize:5,totalItems:A.length,dashboardLinkUrl:b,dashboardLinkLabel:p}))):c().createElement(a.EmptyState,{displayText:o,headerTitle:s,launchForm:k})}),G),Q=(0,r.getSyncLifecycle)((function(e){var n=e.patientUuid,t=e.launchStartVisitPrompt,i=(0,l.useTranslation)().t,s=(0,r.useConfig)().immunizationsConfig,u=i("immunizations__lower","immunizations"),p=i("immunizations","Immunizations"),b=window.getOpenmrsSpaBase()+"patient/".concat(n,"/chart"),v=i("goToSummary","Go to Summary"),A=(0,r.useVisit)(n).currentVisit,f="tablet"===(0,r.useLayoutType)(),g=null==s?void 0:s.sequenceDefinitions,y=(0,d.v)(n),h=y.data,_=y.isLoading,w=y.error,C=y.isValidating,k=(0,T.xS)(h,g),$=c().useCallback((function(){A?(0,a.launchPatientWorkspace)("immunization-form-workspace"):t()}),[A,t]),z=(0,j.A)(k,[function(e){return(0,P.A)(e,"existingDoses.length",0)}],["desc"]),E=(0,o.useMemo)((function(){return[{key:"vaccine",header:i("vaccine","Vaccine")},{key:"recentVaccination",header:i("recentVaccination","Recent vaccination")},{key:"add",header:""}]}),[i]),D=(0,o.useMemo)((function(){return null==z?void 0:z.map((function(e){var n,t,a,o,s,u,l=!(null===(n=e.sequences)||void 0===n?void 0:n.length)&&(null===(t=e.existingDoses)||void 0===t?void 0:t.length)?"".concat(i("singleDoseOn","Single Dose on")," ").concat((0,r.formatDate)((0,r.parseDate)(null===(a=(0,x.A)(e.existingDoses.sort(T.yM)))||void 0===a?void 0:a.occurrenceDateTime),{time:!1,noToday:!0})):(null===(o=e.existingDoses)||void 0===o?void 0:o.length)?"".concat(null===(s=(0,x.A)(null==e?void 0:e.sequences))||void 0===s?void 0:s.sequenceLabel," on ").concat((0,r.formatDate)((0,r.parseDate)(null===(u=(0,x.A)(e.existingDoses.sort(T.yM)))||void 0===u?void 0:u.occurrenceDateTime),{time:!1,noToday:!0})," "):"";return{id:e.vaccineUuid,vaccine:e.vaccineName,recentVaccination:l,add:c().createElement(m.$nd,{hasIconOnly:!0,iconDescription:i("add","Add"),kind:"ghost",onClick:function(){T.RA.next({vaccineUuid:e.vaccineUuid,immunizationId:null,vaccinationDate:null,doseNumber:0,expirationDate:null,lotNumber:null,manufacturer:null}),$()},renderIcon:function(e){return c().createElement(r.AddIcon,V({size:16},e))},size:"sm"})}}))}),[$,z,i]),O=(0,r.usePagination)(D,10),N=O.results,S=O.currentPage,q=O.goTo;return _||!z?c().createElement(m.OOb,{role:"progressbar"}):w?c().createElement(a.ErrorState,{error:w,headerTitle:p}):(null==z?void 0:z.length)?c().createElement("div",{className:R.widgetCard},c().createElement(a.CardHeader,{title:p},c().createElement("span",null,C?c().createElement(m.OuH,null):null),c().createElement(m.$nd,{kind:"ghost",renderIcon:function(e){return c().createElement(r.AddIcon,V({size:16},e))},iconDescription:i("addImmunizations","Add immunizations"),onClick:$},i("add","Add"))),c().createElement(m.bQt,{rows:N,headers:E,size:f?"lg":"sm",useZebraStyles:!0},(function(e){var n=e.rows,t=e.headers,r=e.getExpandedRowProps,a=e.getHeaderProps,i=e.getRowProps,o=e.getTableProps,s=e.getExpandHeaderProps;return c().createElement(m.K3K,null,c().createElement(m.XIK,V({"aria-label":"immunizations summary"},o()),c().createElement(m.ndF,null,c().createElement(m.Hjg,null,c().createElement(m.Uwq,V({enableToggle:!0},s())),t.map((function(e){return c().createElement(m.A0N,a({header:e}),e.header)})))),c().createElement(m.BFY,null,n.map((function(e,n){return c().createElement(c().Fragment,{key:e.id},c().createElement(m.fZD,i({row:e}),e.cells.map((function(e){return c().createElement(m.nA6,{key:e.id},e.value)}))),e.isExpanded?c().createElement(m.cwJ,function(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}(V({},r({row:e})),{colSpan:t.length+2}),c().createElement(F,{immunizationsByVaccine:z[n],launchPatientImmunizationForm:$})):c().createElement(m.cwJ,{className:R.hiddenRow,colSpan:t.length+2}))})))))})),c().createElement("div",{className:R.paginationContainer},c().createElement(a.PatientChartPagination,{totalItems:null==D?void 0:D.length,pageSize:10,onPageNumberChange:function(e){var n=e.page;return q(n)},pageNumber:S,currentItems:null==N?void 0:N.length,dashboardLinkUrl:b,dashboardLinkLabel:v}))):c().createElement(a.EmptyState,{displayText:u,headerTitle:p,launchForm:$})}),G),ee=(0,r.getSyncLifecycle)((0,a.createDashboardLink)((J=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){H(e,n,t[n])}))}return e}({},{slot:"patient-chart-immunizations-dashboard-slot",path:"Immunizations",title:"Immunizations",icon:"omrs-icon-syringe"}),W=null!=(W={moduleName:K})?W:{},Object.getOwnPropertyDescriptors?Object.defineProperties(J,Object.getOwnPropertyDescriptors(W)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(W)).forEach((function(e){Object.defineProperty(J,e,Object.getOwnPropertyDescriptor(W,e))})),J)),G),ne=(0,r.getAsyncLifecycle)((function(){return Promise.all([t.e(7038),t.e(8094)]).then(t.bind(t,8094))}),G)},4767:(e,n,t)=>{var r={"./am.json":[1197,1197],"./ar.json":[4132,4132],"./bn.json":[7159,7159],"./de.json":[4944,4944],"./en.json":[4300,4300],"./es.json":[3099,3099],"./fr.json":[4055,4055],"./he.json":[4652,4652],"./hi.json":[6840,6840],"./hi_IN.json":[5442,5442],"./id.json":[2690,2690],"./it.json":[9538,9538],"./km.json":[4335,4335],"./ku.json":[9895,9895],"./ky.json":[8163,8163],"./lg.json":[4618,4618],"./ne.json":[2146,2146],"./pt.json":[6679,6679],"./pt_BR.json":[4087,6468],"./qu.json":[5173,5173],"./ru_RU.json":[986,986],"./si.json":[6859,6859],"./sw.json":[9913,9913],"./sw_KE.json":[8618,8618],"./tr.json":[5241,5241],"./tr_TR.json":[9900,9900],"./uk.json":[723,723],"./uz.json":[3584,3584],"./uz_UZ.json":[890,890],"./vi.json":[9214,9214],"./zh.json":[5661,5661],"./zh_CN.json":[9879,9879]};function a(e){if(!t.o(r,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=r[e],a=n[0];return t.e(n[1]).then((()=>t(a)))}a.keys=()=>Object.keys(r),a.id=4767,e.exports=a}}]);
|
|
1
|
+
(globalThis.webpackChunk_openmrs_esm_patient_immunizations_app=globalThis.webpackChunk_openmrs_esm_patient_immunizations_app||[]).push([[915],{3905:(e,n,t)=>{"use strict";t.d(n,{A:()=>c});var r=t(977),a=t.n(r),i=t(5924),o=t.n(i)()(a());o.push([e.id,".-esm-patient-immunizations__immunizations-sequence-table__tableCell___wKcW5{padding:0 1.5rem !important}.-esm-patient-immunizations__immunizations-sequence-table__sequenceTable___-UEob{margin:.5rem 0}","",{version:3,sources:["webpack://./src/immunizations/components/immunizations-sequence-table.scss"],names:[],mappings:"AAEA,6EACE,2BAAA,CAGF,iFACE,cAAA",sourcesContent:["@use '@carbon/layout';\n\n.tableCell {\n padding: 0 layout.$spacing-06 !important;\n}\n\n.sequenceTable {\n margin: layout.$spacing-03 0;\n}\n"],sourceRoot:""}]),o.locals={tableCell:"-esm-patient-immunizations__immunizations-sequence-table__tableCell___wKcW5",sequenceTable:"-esm-patient-immunizations__immunizations-sequence-table__sequenceTable___-UEob"};const c=o},8241:(e,n,t)=>{"use strict";t.d(n,{A:()=>c});var r=t(977),a=t.n(r),i=t(5924),o=t.n(i)()(a());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-immunizations__immunizations-detailed-summary__widgetCard___qFFJo{border:1px solid #e0e0e0;background-color:#fff}.-esm-patient-immunizations__immunizations-detailed-summary__hiddenRow___9yEg8{display:none}.-esm-patient-immunizations__immunizations-detailed-summary__paginationContainer___UsPke>div{border-top:none !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/immunizations/immunizations-detailed-summary.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC3DF,gFACE,wBAAA,CACA,qBDDM,CCIR,+EACE,YAAA,CAIA,6FACE,0BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.widgetCard {\n border: 1px solid $ui-03;\n background-color: $ui-02;\n}\n\n.hiddenRow {\n display: none;\n}\n\n.paginationContainer {\n > div {\n border-top: none !important;\n }\n}\n"],sourceRoot:""}]),o.locals={widgetCard:"-esm-patient-immunizations__immunizations-detailed-summary__widgetCard___qFFJo",hiddenRow:"-esm-patient-immunizations__immunizations-detailed-summary__hiddenRow___9yEg8",paginationContainer:"-esm-patient-immunizations__immunizations-detailed-summary__paginationContainer___UsPke"};const c=o},3995:(e,n,t)=>{"use strict";t.d(n,{A:()=>c});var r=t(977),a=t.n(r),i=t(5924),o=t.n(i)()(a());o.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79;--bottom-nav-height: 4rem;--workspace-header-height: 3rem;--tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));--desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height))}.-esm-patient-immunizations__immunizations-overview__widgetCard___-dZJa{border:1px solid #e0e0e0}.-esm-patient-immunizations__immunizations-overview__immunizationOverviewSummaryCard___FnG1n{margin:1.25rem 1.5rem}.-esm-patient-immunizations__immunizations-overview__immunizationMore___Xd5Aa{display:flex;align-items:center;border:none;padding:.625rem 1.625rem .625rem 1rem;background-color:var(--omrs-color-bg-medium-contrast);color:var(--omrs-color-ink-medium-contrast);cursor:pointer}.-esm-patient-immunizations__immunizations-overview__immunizationMore___Xd5Aa p{margin:0}.-esm-patient-immunizations__immunizations-overview__paginationContainer___XNZP8>div{border-top:none !important}","",{version:3,sources:["webpack://./../../node_modules/@openmrs/esm-styleguide/src/_vars.scss","webpack://./src/immunizations/immunizations-overview.scss"],names:[],mappings:"AAsDA,MACE,mBAAA,CACA,mBAAA,CACA,mBAAA,CACA,yBAAA,CACA,+BAAA,CACA,oGAAA,CACA,2GAAA,CC1DF,wEACE,wBAAA,CAGF,6FACE,qBAAA,CAGF,8EACE,YAAA,CACA,kBAAA,CACA,WAAA,CACA,qCAAA,CACA,qDAAA,CACA,2CAAA,CACA,cAAA,CAGF,gFACE,QAAA,CAIA,qFACE,0BAAA",sourcesContent:["@use '@carbon/layout';\n\n$ui-01: #f4f4f4;\n$ui-02: #ffffff;\n$ui-03: #e0e0e0;\n$ui-04: #8d8d8d;\n$ui-05: #161616;\n$text-02: #525252;\n$text-03: #a8a8a8;\n$ui-background: #ffffff;\n$color-gray-30: #c6c6c6;\n$color-gray-70: #525252;\n$color-gray-100: #161616;\n$color-blue-60-2: #0f62fe;\n$color-blue-10: #edf5ff;\n$color-yellow-50: #feecae;\n$carbon--red-50: #fa4d56;\n$inverse-link: #78a9ff;\n$support-02: #24a148;\n$inverse-support-03: #f1c21b;\n$warning-background: #fff8e1;\n$openmrs-background-grey: #f4f4f4;\n$danger: #da1e28;\n$interactive-01: #0f62fe;\n$field-01: #f4f4f4;\n$grey-2: #e0e0e0;\n$labeldropdown: #c6c6c6;\n\n$brand-primary-10: #d9fbfb;\n$brand-primary-20: #9ef0f0;\n$brand-primary-30: #3ddbd9;\n$brand-primary-40: #08bdba;\n$brand-primary-50: #009d9a;\n\n/* 60,70 and 80 are already declared as brand-01, 02 and 03 respectively */\n\n$brand-primary-90: #022b30;\n$brand-primary-100: #081a1c;\n\n@mixin brand-01($property) {\n #{$property}: #005d5d;\n #{$property}: var(--brand-01);\n}\n\n@mixin brand-02($property) {\n #{$property}: #004144;\n #{$property}: var(--brand-02);\n}\n\n@mixin brand-03($property) {\n #{$property}: #007d79;\n #{$property}: var(--brand-03);\n}\n\n:root {\n --brand-01: #005d5d;\n --brand-02: #004144;\n --brand-03: #007d79;\n --bottom-nav-height: #{layout.$spacing-10};\n --workspace-header-height: #{layout.$spacing-09};\n --tablet-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--bottom-nav-height));\n --desktop-workspace-window-height: calc(100vh - var(--omrs-navbar-height) - var(--workspace-header-height));\n}\n\n$breakpoint-phone-min: 0px;\n$breakpoint-phone-max: 600px;\n$breakpoint-tablet-min: 601px;\n$breakpoint-tablet-max: 1023px;\n$breakpoint-small-desktop-min: 1024px;\n$breakpoint-small-desktop-max: 1439px;\n$breakpoint-large-desktop-min: 1440px;\n$breakpoint-large-desktop-max: 99999999px;\n\n/* These color variables will be removed in a future release */\n$brand-teal-01: #007d79;\n$brand-01: #005d5d;\n$brand-02: #004144;\n","@use '@carbon/layout';\n@use '@openmrs/esm-styleguide/src/vars' as *;\n\n.widgetCard {\n border: 1px solid $ui-03;\n}\n\n.immunizationOverviewSummaryCard {\n margin: 1.25rem layout.$spacing-06;\n}\n\n.immunizationMore {\n display: flex;\n align-items: center;\n border: none;\n padding: 0.625rem 1.625rem 0.625rem layout.$spacing-05;\n background-color: var(--omrs-color-bg-medium-contrast);\n color: var(--omrs-color-ink-medium-contrast);\n cursor: pointer;\n}\n\n.immunizationMore p {\n margin: 0;\n}\n\n.paginationContainer {\n > div {\n border-top: none !important;\n }\n}\n"],sourceRoot:""}]),o.locals={widgetCard:"-esm-patient-immunizations__immunizations-overview__widgetCard___-dZJa",immunizationOverviewSummaryCard:"-esm-patient-immunizations__immunizations-overview__immunizationOverviewSummaryCard___FnG1n",immunizationMore:"-esm-patient-immunizations__immunizations-overview__immunizationMore___Xd5Aa",paginationContainer:"-esm-patient-immunizations__immunizations-overview__paginationContainer___XNZP8"};const c=o},4559:(e,n,t)=>{"use strict";t.d(n,{v:()=>o});var r=t(8254),a=t(1123),i=t(5650);function o(e){var n="".concat(r.fhirBaseUrl,"/Immunization?patient=").concat(e),t=(0,a.Ay)(n,r.openmrsFetch),o=t.data,c=t.error,s=t.isLoading,u=t.isValidating,l=t.mutate;return{data:o?(0,i.q)(o.data):null,error:c,isLoading:s,isValidating:u,mutate:l}}},5650:(e,n,t)=>{"use strict";t.d(n,{D:()=>p,q:()=>m});var r=t(6621),a=t(385),i=t(8491),o=t(4501),c=t(4683),s=t(7499),u=function(e){var n,t,r,a=null==e?void 0:e.resource,i=null==a?void 0:a.id,o=null==a||null===(n=a.manufacturer)||void 0===n?void 0:n.display,c=null==a?void 0:a.lotNumber,s=(null==a||null===(t=a.protocolApplied)||void 0===t?void 0:t.length)>0&&(null==a?void 0:a.protocolApplied[0]);return{immunizationObsUuid:i,manufacturer:o,lotNumber:c,doseNumber:null==s?void 0:s.doseNumberPositiveInt,occurrenceDateTime:null==a?void 0:a.occurrenceDateTime,expirationDate:null==a?void 0:a.expirationDate,visitUuid:(r=null==a?void 0:a.encounter,r.reference.split("/")[1])}},l=function(e){var n;return(0,r.A)(null==e||null===(n=e.vaccineCode)||void 0===n?void 0:n.coding,(function(e){return(0,o.A)(e.system)}))},m=function(e){var n=(0,i.A)(e.entry,(function(e){var n;return null===(n=l(e.resource))||void 0===n?void 0:n.code}));return(0,c.A)(n,(function(e){var n,t=(0,c.A)(e,u),r=l(null===(n=e[0])||void 0===n?void 0:n.resource);return{vaccineName:null==r?void 0:r.display,vaccineUuid:null==r?void 0:r.code,existingDoses:(0,s.A)(t,[function(e){return(0,a.A)(e,"occurrenceDateTime")}],["desc"])}}))};function d(e,n){return{type:e,reference:"".concat(e,"/").concat(n)}}var p=function(e,n,t,r){return{resourceType:"Immunization",status:"completed",id:e.immunizationId,vaccineCode:{coding:[{code:e.vaccineUuid,display:e.vaccineName}]},patient:d("Patient",e.patientUuid),encounter:d("Encounter",n),occurrenceDateTime:e.vaccinationDate,expirationDate:e.expirationDate,location:d("Location",t),performer:[{actor:d("Practitioner",r)}],manufacturer:{display:e.manufacturer},lotNumber:e.lotNumber,protocolApplied:[{doseNumberPositiveInt:e.doseNumber,series:null}]}}},2219:(e,n,t)=>{"use strict";t.d(n,{RA:()=>i,xS:()=>o,yM:()=>c});var r=t(4683),a=t(6621),i=new(t(3214).BehaviorSubject)(null),o=function(e,n){return(0,r.A)(e,(function(e){var t=(0,a.A)(n,(function(n){return n.vaccineConceptUuid===e.vaccineUuid}));return e.sequences=(null==t?void 0:t.sequences)||[],e}))},c=function(e,n){return new Date(n.occurrenceDateTime).getTime()-new Date(e.occurrenceDateTime).getTime()}},915:(e,n,t)=>{"use strict";t.r(n),t.d(n,{immunizationFormWorkspace:()=>ne,immunizationsDashboardLink:()=>ee,immunizationsDetailedSummary:()=>Q,immunizationsOverview:()=>Y,importTranslation:()=>Z,startupApp:()=>X});var r=t(8254),a=t(7223),i={immunizationsConfig:{immunizationConceptSet:{_type:r.Type.String,_default:"CIEL:984",_description:"A uuid or concept mapping which will have all the possible vaccines as set-members."},sequenceDefinitions:{_type:r.Type.Array,_description:"Doses/Schedules definitions for each vaccine configured if applicable. If not provided the vaccine would be treated as a vaccine without schedules",_elements:{vaccineConceptUuid:{_type:r.Type.UUID,_description:"The UUID of the individual vaccine concept"},sequences:{_type:r.Type.Array,_elements:{sequenceLabel:{_type:r.Type.String,_description:"Name of the dose/booster/schedule.. This will be used as a translation key as well."},sequenceNumber:{_type:r.Type.Number,_description:"The dose number in the vaccines. Convention for doses is [1...9] and for boosters is [11...19]"}}}},_default:[{vaccineConceptUuid:"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",sequences:[{sequenceLabel:"Dose-1",sequenceNumber:1},{sequenceLabel:"Dose-2",sequenceNumber:2},{sequenceLabel:"Dose-3",sequenceNumber:3},{sequenceLabel:"Dose-4",sequenceNumber:4},{sequenceLabel:"Booster-1",sequenceNumber:11},{sequenceLabel:"Booster-2",sequenceNumber:12}]}]}}},o=t(1343),c=t.n(o),s=t(3373),u=t.n(s),l=t(3150),m=t(997),d=t(4559),p=t(506),b=t.n(p),v=t(9867),A=t.n(v),f=t(105),g=t.n(f),y=t(7154),h=t.n(y),_=t(5326),w=t.n(_),C=t(7763),k=t.n(C),$=t(3995),z={};z.styleTagTransform=k(),z.setAttributes=h(),z.insert=g().bind(null,"head"),z.domAPI=A(),z.insertStyleElement=w(),b()($.A,z);const E=$.A&&$.A.locals?$.A.locals:void 0;function D(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){D(e,n,t[n])}))}return e}var j=t(7499),P=t(385),x=t(9915),T=t(2219),N=t(5992),S=t(3905),q={};q.styleTagTransform=k(),q.setAttributes=h(),q.insert=g().bind(null,"head"),q.domAPI=A(),q.insertStyleElement=w(),b()(S.A,q);const I=S.A&&S.A.locals?S.A.locals:void 0;function U(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}const F=function(e){var n=e.immunizationsByVaccine,t=e.launchPatientImmunizationForm,a=(0,l.useTranslation)().t,i=n.existingDoses,s=n.sequences,u=n.vaccineUuid,d=(0,o.useMemo)((function(){return[{key:"sequence",header:s.length?a("sequence","Sequence"):a("doseNumber","Dose number")},{key:"vaccinationDate",header:a("vaccinationDate","Vaccination date")},{key:"expirationDate",header:a("expirationDate","Expiration date")},{key:"edit",header:""}]}),[a,s.length]),p=null==i?void 0:i.map((function(e){return{id:null==e?void 0:e.immunizationObsUuid,sequence:(0,N.A)(s)?e.doseNumber||0:(null==s?void 0:s.find((function(n){return n.sequenceNumber===e.doseNumber})).sequenceLabel)||e.doseNumber,vaccinationDate:(null==e?void 0:e.occurrenceDateTime)&&(0,r.formatDate)((0,r.parseDate)(e.occurrenceDateTime),{noToday:!0}),expirationDate:(null==e?void 0:e.expirationDate)&&(0,r.formatDate)((0,r.parseDate)(e.expirationDate),{noToday:!0}),edit:c().createElement(m.$nd,{kind:"ghost",iconDescription:(0,r.getCoreTranslation)("edit","Edit"),renderIcon:function(e){return c().createElement(r.EditIcon,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){U(e,n,t[n])}))}return e}({size:16},e))},onClick:function(){T.RA.next({vaccineUuid:u,immunizationId:e.immunizationObsUuid,vaccinationDate:e.occurrenceDateTime&&(0,r.parseDate)(e.occurrenceDateTime),doseNumber:e.doseNumber,expirationDate:e.expirationDate&&(0,r.parseDate)(e.expirationDate),lotNumber:e.lotNumber,manufacturer:e.manufacturer,visitId:e.visitUuid}),t()}},(0,r.getCoreTranslation)("edit","Edit"))}}));return p.length>0&&c().createElement(m.bQt,{rows:p,headers:d,useZebraStyles:!0},(function(e){var n=e.rows,t=e.headers,r=e.getHeaderProps,a=e.getTableProps;return c().createElement(m.K3K,{className:I.sequenceTable},c().createElement(m.XIK,a(),c().createElement(m.ndF,null,c().createElement(m.Hjg,null,t.map((function(e){return c().createElement(m.A0N,r({header:e}),e.header)})))),c().createElement(m.BFY,null,n.map((function(e){return c().createElement(m.Hjg,{key:e.id},e.cells.map((function(e){return c().createElement(m.nA6,{key:null==e?void 0:e.id,className:I.tableCell},null==e?void 0:e.value)})))})))))}))};var B=t(8241),L={};L.styleTagTransform=k(),L.setAttributes=h(),L.insert=g().bind(null,"head"),L.domAPI=A(),L.insertStyleElement=w(),b()(B.A,L);const R=B.A&&B.A.locals?B.A.locals:void 0;function M(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function V(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){M(e,n,t[n])}))}return e}function H(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var K="@openmrs/esm-patient-immunizations-app",G={featureName:"patient-immunizations",moduleName:K},Z=t(4767);function X(){(0,r.defineConfigSchema)(K,i)}var J,W,Y=(0,r.getSyncLifecycle)((function(e){e.patient;var n=e.patientUuid,t=e.basePath,i=(0,l.useTranslation)().t,o=i("immunizations__lower","immunizations"),s=i("immunizations","Immunizations"),p=i("seeAll","See all"),b=window.spaBase+t+"/immunizations",v=(0,d.v)(n),A=v.data,f=v.error,g=v.isLoading,y=v.isValidating,h=(0,r.usePagination)(null!=A?A:[],5),_=h.results,w=h.goTo,C=h.currentPage,k=c().useCallback((function(){return(0,a.launchPatientWorkspace)("immunization-form-workspace")}),[]),$=[{key:"vaccineName",header:i("recentVaccination","Recent vaccination")},{key:"vaccinationDate",header:i("vaccinationDate","Vaccination date")}],z=c().useMemo((function(){return null==_?void 0:_.map((function(e,n){return function(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}(O({},e),{id:"".concat(n),vaccineName:e.vaccineName,vaccinationDate:"".concat((0,r.formatDate)((0,r.parseDate)(e.existingDoses[0].occurrenceDateTime),{day:!1,time:!1}))})}))}),[_]);return g?c().createElement(m.OOb,{role:"progressbar"}):f?c().createElement(a.ErrorState,{error:f,headerTitle:s}):(null==A?void 0:A.length)?c().createElement("div",{className:E.widgetCard},c().createElement(a.CardHeader,{title:s},c().createElement("span",null,y?c().createElement(m.OuH,null):null),c().createElement(m.$nd,{kind:"ghost",renderIcon:function(e){return c().createElement(r.AddIcon,O({size:16},e))},iconDescription:"Add immunizations",onClick:k},i("add","Add"))),c().createElement(m.bQt,{headers:$,rows:z,isSortable:!0,size:"sm",useZebraStyles:!0},(function(e){var n=e.rows,t=e.headers,r=e.getHeaderProps,a=e.getTableProps;return c().createElement(m.K3K,null,c().createElement(m.XIK,a(),c().createElement(m.ndF,null,c().createElement(m.Hjg,null,t.map((function(e){var n,t;return c().createElement(m.A0N,O({className:u()(E.productiveHeading01,E.text02)},r({header:e,isSortable:e.isSortable})),null!==(t=null===(n=e.header)||void 0===n?void 0:n.content)&&void 0!==t?t:e.header)})))),c().createElement(m.BFY,null,n.map((function(e){return c().createElement(m.Hjg,{key:e.id},e.cells.map((function(e){var n,t;return c().createElement(m.nA6,{key:e.id},null!==(t=null===(n=e.value)||void 0===n?void 0:n.content)&&void 0!==t?t:e.value)})))})))))})),c().createElement("div",{className:E.paginationContainer},c().createElement(a.PatientChartPagination,{currentItems:_.length,onPageNumberChange:function(e){var n=e.page;return w(n)},pageNumber:C,pageSize:5,totalItems:A.length,dashboardLinkUrl:b,dashboardLinkLabel:p}))):c().createElement(a.EmptyState,{displayText:o,headerTitle:s,launchForm:k})}),G),Q=(0,r.getSyncLifecycle)((function(e){var n=e.patientUuid,t=e.launchStartVisitPrompt,i=(0,l.useTranslation)().t,s=(0,r.useConfig)().immunizationsConfig,u=i("immunizations__lower","immunizations"),p=i("immunizations","Immunizations"),b=window.getOpenmrsSpaBase()+"patient/".concat(n,"/chart"),v=i("goToSummary","Go to Summary"),A=(0,r.useVisit)(n).currentVisit,f="tablet"===(0,r.useLayoutType)(),g=null==s?void 0:s.sequenceDefinitions,y=(0,d.v)(n),h=y.data,_=y.isLoading,w=y.error,C=y.isValidating,k=(0,T.xS)(h,g),$=c().useCallback((function(){A?(0,a.launchPatientWorkspace)("immunization-form-workspace"):t()}),[A,t]),z=(0,j.A)(k,[function(e){return(0,P.A)(e,"existingDoses.length",0)}],["desc"]),E=(0,o.useMemo)((function(){return[{key:"vaccine",header:i("vaccine","Vaccine")},{key:"recentVaccination",header:i("recentVaccination","Recent vaccination")},{key:"add",header:""}]}),[i]),D=(0,o.useMemo)((function(){return null==z?void 0:z.map((function(e){var n,t,a,o,s,u,l=!(null===(n=e.sequences)||void 0===n?void 0:n.length)&&(null===(t=e.existingDoses)||void 0===t?void 0:t.length)?"".concat(i("singleDoseOn","Single Dose on")," ").concat((0,r.formatDate)((0,r.parseDate)(null===(a=(0,x.A)(e.existingDoses.sort(T.yM)))||void 0===a?void 0:a.occurrenceDateTime),{time:!1,noToday:!0})):(null===(o=e.existingDoses)||void 0===o?void 0:o.length)?"".concat(null===(s=(0,x.A)(null==e?void 0:e.sequences))||void 0===s?void 0:s.sequenceLabel," on ").concat((0,r.formatDate)((0,r.parseDate)(null===(u=(0,x.A)(e.existingDoses.sort(T.yM)))||void 0===u?void 0:u.occurrenceDateTime),{time:!1,noToday:!0})," "):"";return{id:e.vaccineUuid,vaccine:e.vaccineName,recentVaccination:l,add:c().createElement(m.$nd,{hasIconOnly:!0,iconDescription:i("add","Add"),kind:"ghost",onClick:function(){T.RA.next({vaccineUuid:e.vaccineUuid,immunizationId:null,vaccinationDate:null,doseNumber:0,expirationDate:null,lotNumber:null,manufacturer:null}),$()},renderIcon:function(e){return c().createElement(r.AddIcon,V({size:16},e))},size:"sm"})}}))}),[$,z,i]),O=(0,r.usePagination)(D,10),N=O.results,S=O.currentPage,q=O.goTo;return _||!z?c().createElement(m.OOb,{role:"progressbar"}):w?c().createElement(a.ErrorState,{error:w,headerTitle:p}):(null==z?void 0:z.length)?c().createElement("div",{className:R.widgetCard},c().createElement(a.CardHeader,{title:p},c().createElement("span",null,C?c().createElement(m.OuH,null):null),c().createElement(m.$nd,{kind:"ghost",renderIcon:function(e){return c().createElement(r.AddIcon,V({size:16},e))},iconDescription:i("addImmunizations","Add immunizations"),onClick:$},i("add","Add"))),c().createElement(m.bQt,{rows:N,headers:E,size:f?"lg":"sm",useZebraStyles:!0},(function(e){var n=e.rows,t=e.headers,r=e.getExpandedRowProps,a=e.getHeaderProps,i=e.getRowProps,o=e.getTableProps,s=e.getExpandHeaderProps;return c().createElement(m.K3K,null,c().createElement(m.XIK,V({"aria-label":"immunizations summary"},o()),c().createElement(m.ndF,null,c().createElement(m.Hjg,null,c().createElement(m.Uwq,V({enableToggle:!0},s())),t.map((function(e){return c().createElement(m.A0N,a({header:e}),e.header)})))),c().createElement(m.BFY,null,n.map((function(e,n){return c().createElement(c().Fragment,{key:e.id},c().createElement(m.fZD,i({row:e}),e.cells.map((function(e){return c().createElement(m.nA6,{key:e.id},e.value)}))),e.isExpanded?c().createElement(m.cwJ,function(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}(V({},r({row:e})),{colSpan:t.length+2}),c().createElement(F,{immunizationsByVaccine:z[n],launchPatientImmunizationForm:$})):c().createElement(m.cwJ,{className:R.hiddenRow,colSpan:t.length+2}))})))))})),c().createElement("div",{className:R.paginationContainer},c().createElement(a.PatientChartPagination,{totalItems:null==D?void 0:D.length,pageSize:10,onPageNumberChange:function(e){var n=e.page;return q(n)},pageNumber:S,currentItems:null==N?void 0:N.length,dashboardLinkUrl:b,dashboardLinkLabel:v}))):c().createElement(a.EmptyState,{displayText:u,headerTitle:p,launchForm:$})}),G),ee=(0,r.getSyncLifecycle)((0,a.createDashboardLink)((J=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){H(e,n,t[n])}))}return e}({},{slot:"patient-chart-immunizations-dashboard-slot",path:"Immunizations",title:"Immunizations",icon:"omrs-icon-syringe"}),W=null!=(W={moduleName:K})?W:{},Object.getOwnPropertyDescriptors?Object.defineProperties(J,Object.getOwnPropertyDescriptors(W)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(W)).forEach((function(e){Object.defineProperty(J,e,Object.getOwnPropertyDescriptor(W,e))})),J)),G),ne=(0,r.getAsyncLifecycle)((function(){return Promise.all([t.e(7038),t.e(8094)]).then(t.bind(t,8094))}),G)},4767:(e,n,t)=>{var r={"./am.json":[1197,1197],"./ar.json":[4132,4132],"./bn.json":[7159,7159],"./de.json":[4944,4944],"./en.json":[4300,4300],"./es.json":[3099,3099],"./fr.json":[4055,4055],"./he.json":[4652,4652],"./hi.json":[6840,6840],"./hi_IN.json":[5442,5442],"./id.json":[2690,2690],"./it.json":[9538,9538],"./km.json":[4335,4335],"./ku.json":[9895,9895],"./ky.json":[8163,8163],"./lg.json":[4618,4618],"./ne.json":[9765,2146],"./pt.json":[6679,6679],"./pt_BR.json":[4087,6468],"./qu.json":[5173,5173],"./ru_RU.json":[986,986],"./si.json":[6859,6859],"./sw.json":[9913,9913],"./sw_KE.json":[8618,8618],"./tr.json":[5241,5241],"./tr_TR.json":[9900,9900],"./uk.json":[723,723],"./uz.json":[3584,3584],"./uz_UZ.json":[890,890],"./vi.json":[9214,9214],"./zh.json":[5661,5661],"./zh_CN.json":[9879,9879]};function a(e){if(!t.o(r,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=r[e],a=n[0];return t.e(n[1]).then((()=>t(a)))}a.keys=()=>Object.keys(r),a.id=4767,e.exports=a}}]);
|