@pih/esm-pathology-app 1.0.3 → 1.0.6

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.
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_pih_esm_pathology_app=self.webpackChunk_pih_esm_pathology_app||[]).push([[66],{66:(e,t,a)=>{a.r(t),a.d(t,{default:()=>E});var n=a(954),o=a(379),r=a.n(o),s=a(724);r()(s.Z,{insert:"head",singleton:!1});const l=s.Z.locals||{};var d=a(489),u=a(311),i=a(832),p=a(529),c=a(289),m=a(758),f=a(586),h=a(450),A=a(188),y=a(17);r()(y.Z,{insert:"head",singleton:!1});const g=y.Z.locals||{};async function b(e){var t;const a=(await(0,d.openmrsFetch)("/ws/rest/v1/session")).data.user.person.uuid;return null===(t=(await(0,d.openmrsFetch)(`/ws/rest/v1/person/${a}/attribute`)).data.results.filter((t=>t.attributeType.uuid===e))[0])||void 0===t?void 0:t.value.uuid}async function _(e){return(await(0,d.openmrsFetch)(`/ws/rest/v1/concept/${e}?v=full`)).data.answers}const C=()=>{const e=(0,d.useConfig)(),[t,a]=n.default.useState(),[o,r]=n.default.useState([]),[s,l]=n.default.useState(""),[y,C]=n.default.useState([]),[E,v]=n.default.useState([]),[w,U]=n.default.useState([]),[S,k]=n.default.useState(""),[D,I]=n.default.useState(""),[O,B]=n.default.useState("");n.default.useEffect((()=>{b(e.healthCenterAttrTypeUUID).then(a),async function(){return(await(0,d.openmrsFetch)("/ws/rest/v1/location")).data.results}().then(C),_(e.sampleStatusConceptUUID).then(v),_(e.referralStatusConceptUUID).then(U),async function(e,t){const a=await b(e);let n=null;return n=a&&a!=t?await(0,d.openmrsFetch)(`/ws/rest/v1/reportingrest/reportdata/996cf192-ff54-11eb-a63a-080027ce9ca0?location=${a}`):await(0,d.openmrsFetch)("/ws/rest/v1/reportingrest/reportdata/996cf192-ff54-11eb-a63a-080027ce9ca0"),n.data.dataSets[0].rows}(e.healthCenterAttrTypeUUID,e.pathologyFullAllowedLocationUUID).then(r)}),[]);const x=o.filter((e=>{var t;return!S||(null===(t=e.sampleStatusObs)||void 0===t?void 0:t.toLowerCase())==S.toLowerCase()})).filter((e=>{var t;return!D||(null===(t=e.referralStatusObs)||void 0===t?void 0:t.toLowerCase())==D.toLowerCase()})).filter((e=>{var t;return!s||(null===(t=e.patientHealthCenter)||void 0===t?void 0:t.toLowerCase())==s.toLowerCase()})).filter((e=>{if(O){const t=O.split(/\s+/),a=`${e.family_name} ${e.middle_name} ${e.given_name}`;return t.every((e=>new RegExp("\\b"+e,"i").test(a)))}return!0})).map((a=>({id:a.encounterId,patientNames:n.default.createElement("a",{"data-testid":"patientNames",href:`/openmrs/patientDashboard.form?patientId=${a.personId}`},a.family_name," ",a.given_name," ",a.middle_name),pathologyRequest:n.default.createElement("a",{href:`/openmrs/module/htmlformentry/htmlFormEntry.form?encounterId=${a.encounterId}&mode=VIEW`}," ","Link"," "),sendingHospital:a.patientHealthCenter,phoneNumber:a.patientPhoneNumber||"",sampleStatus:n.default.createElement("select",{onChange:e=>F({uuid:e.target.value,display:e.target.options[e.target.selectedIndex].text},a)},n.default.createElement("option",{value:""}),E.map((e=>n.default.createElement("option",{"data-testid":"sampleStatus-option",value:e.uuid,key:e.uuid,selected:!!a.sampleStatusObs&&a.sampleStatusObs===e.display&&!0},e.display)))),dateOfRequest:a.encounterDatetime,referralStatus:n.default.createElement("select",{onChange:e=>Z({uuid:e.target.value,display:e.target.options[e.target.selectedIndex].text},a)},n.default.createElement("option",{"data-testid":"referralStatus-option",value:""}),w.map((e=>n.default.createElement("option",{value:e.uuid,key:e.uuid,selected:a.referralStatusObs&&a.referralStatusObs===e.display},e.display)))),sampleDropOff:n.default.createElement("input",{"data-testid":"sampleDropOff",type:"checkbox",checked:Boolean(a.sampleDropoffObs),onChange:e=>R(a)}),resultsEncounter:a.resultsEncounterId?n.default.createElement("a",{"data-testid":"resultsEncounter",href:`/openmrs/module/htmlformentry/htmlFormEntry.form?encounterId=${a.resultsEncounterId}&mode=VIEW`}," ","Results"," "):(!t||t===e.pathologyFullAllowedLocationUUID)&&n.default.createElement("a",{href:`/openmrs/module/htmlformentry/htmlFormEntry.form?personId=${a.personId}&patientId=${a.personId}&returnUrl=&formId=${e.pathologyResultsFromID}&uuid=${a.encounterUuid}`}," ","Fill in results"," ")}))),R=t=>{const a=(0,u.Z)(o);t.sampleDropoffObs?async function(e){return await(0,d.openmrsFetch)(`/ws/rest/v1/obs/${e}`,{method:"POST",headers:{"content-type":"application/json"},body:{voided:!0}})}(t.sampleDropoffObsUuid).then((e=>{if(e.ok){const e=a.findIndex((e=>e.encounterUuid==t.encounterUuid));a[e].sampleDropoffObs="",a[e].sampleDropoffObsUuid="",r(a)}})):async function(e,t,a,n){const o={person:e.patientUuid,obsDatetime:(new Date).toISOString(),concept:t,location:await b(a),encounter:e.encounterUuid,value:n,voided:!1};return await(0,d.openmrsFetch)("/ws/rest/v1/obs",{method:"POST",headers:{"content-type":"application/json"},body:o})}(t,e.sampleDropOffconceptUUID,e.healthCenterAttrTypeUUID,e.yesConceptUUID).then((n=>{if(n.ok){const o=a.findIndex((e=>e.encounterUuid==t.encounterUuid));a[o].sampleDropoffObs=e.yesConceptName,a[o].sampleDropoffObsUuid=n.data.uuid,r(a)}}))},F=(t,a)=>{const n=(0,u.Z)(o);a.sampleStatusObs?async function(e,t,a,n){const o={person:t.patientUuid,obsDatetime:(new Date).toISOString(),concept:a,location:await b(n),encounter:t.encounterUuid,value:e.uuid,voided:!e};return await(0,d.openmrsFetch)(`/ws/rest/v1/obs/${t.sampleStatusObsUuid}`,{method:"POST",headers:{"content-type":"application/json"},body:o})}(t,a,e.sampleStatusConceptUUID,e.healthCenterAttrTypeUUID).then((e=>{if(e.ok){const o=n.findIndex((e=>e.encounterUuid==a.encounterUuid));n[o].sampleStatusObs=t.display,n[o].sampleStatusObsUuid=e.data.uuid,r(n)}else r(n)})):async function(e,t,a,n){const o={person:t.patientUuid,obsDatetime:(new Date).toISOString(),concept:a,location:await b(n),encounter:t.encounterUuid,value:e,voided:!1};return await(0,d.openmrsFetch)("/ws/rest/v1/obs",{method:"POST",headers:{"content-type":"application/json"},body:o})}(t.uuid,a,e.sampleStatusConceptUUID,e.healthCenterAttrTypeUUID).then((e=>{if(e.ok){const o=n.findIndex((e=>e.encounterUuid==a.encounterUuid));n[o].sampleStatusObs=t.display,n[o].sampleStatusObsUuid=e.data.uuid,r(n)}else r(n)}))},Z=(t,a)=>{const n=(0,u.Z)(o);a.referralStatusObs?async function(e,t,a,n){const o={person:t.patientUuid,obsDatetime:(new Date).toISOString(),concept:a,location:await b(n),encounter:t.encounterUuid,value:e.uuid,voided:!e};return await(0,d.openmrsFetch)(`/ws/rest/v1/obs/${t.referralStatusObsUuid}`,{method:"POST",headers:{"content-type":"application/json"},body:o})}(t,a,e.referralStatusConceptUUID,e.healthCenterAttrTypeUUID).then((e=>{if(e.ok){const o=n.findIndex((e=>e.encounterUuid==a.encounterUuid));n[o].referralStatusObs=t.display,n[o].referralStatusObsUuid=e.data.uuid,r(n)}else r(n)})):async function(e,t,a,n){const o={person:t.patientUuid,obsDatetime:(new Date).toISOString(),concept:a,location:await b(n),encounter:t.encounterUuid,value:e,voided:!1};return await(0,d.openmrsFetch)("/ws/rest/v1/obs",{method:"POST",headers:{"content-type":"application/json"},body:o})}(t.uuid,a,e.referralStatusConceptUUID,e.healthCenterAttrTypeUUID).then((e=>{if(e.ok){const o=n.findIndex((e=>e.encounterUuid==a.encounterUuid));n[o].referralStatusObs=t.display,n[o].referralStatusObsUuid=e.data.uuid,r(n)}else r(n)}))};return n.default.createElement("div",null,n.default.createElement("div",{className:g.filtersContainer},n.default.createElement("label",{htmlFor:"sending-hospital"},"Sending Hospital "),n.default.createElement("select",{id:"sending-hospital",className:g.dropdown,value:s,onChange:e=>l(e.target.value)},n.default.createElement("option",{value:""}),y.map((a=>t&&t!==e.pathologyFullAllowedLocationUUID?a.uuid===t?n.default.createElement("option",{value:a.display,key:a.uuid},a.display):null:n.default.createElement("option",{value:a.display,key:a.uuid},a.display)))),n.default.createElement("label",{htmlFor:"sample-status"},"Sample Status "),n.default.createElement("select",{id:"sample-status",className:g.dropdown,value:S,onChange:e=>k(e.target.value)},n.default.createElement("option",{value:""}),E.map((e=>n.default.createElement("option",{value:e.display,key:e.uuid},e.display)))),n.default.createElement("label",{htmlFor:"referral-status"},"Referral Status "),n.default.createElement("select",{id:"referral-status",className:g.dropdown,value:D,onChange:e=>I(e.target.value)},n.default.createElement("option",{value:""}),w.map((e=>n.default.createElement("option",{value:e.display,key:e.uuid},e.display)))),n.default.createElement("label",{htmlFor:"patient-name"},"Patient Name "),n.default.createElement("input",{id:"patient-name",className:g.textBox,type:"text",onChange:e=>B(e.target.value)})),n.default.createElement("div",{className:g.tableContainer},n.default.createElement(i.ZP,{rows:x,headers:[{key:"patientNames",header:"Patient name"},{key:"pathologyRequest",header:"pathology request"},{key:"sendingHospital",header:"Sending Hospital"},{key:"phoneNumber",header:"Phone number"},{key:"sampleStatus",header:"Sample status"},{key:"dateOfRequest",header:"Date of Request"},{key:"referralStatus",header:"Referral status"},{key:"sampleDropOff",header:"Sample drop off?"},{key:"resultsEncounter",header:"Results"}]},(({rows:e,headers:t,getTableProps:a,getHeaderProps:o,getRowProps:r})=>n.default.createElement(p.Z,a(),n.default.createElement(c.Z,null,n.default.createElement(m.Z,null,t.map((e=>n.default.createElement(f.Z,o({header:e}),e.header))))),n.default.createElement(h.Z,null,e.map((e=>n.default.createElement(m.Z,r({row:e}),e.cells.map((e=>n.default.createElement(A.Z,{key:e.id},e.value))))))))))))},E=()=>n.default.createElement("div",{className:`omrs-main-content ${l.container}`},n.default.createElement(C,null))},17:(e,t,a)=>{a.d(t,{Z:()=>l});var n=a(15),o=a.n(n),r=a(645),s=a.n(r)()(o());s.push([e.id,".-esm-pathology__ReportComponent__tableContainer___YHJce {\n height: 500px;\n overflow-x: auto;\n margin: 0 1rem;\n border: 2px solid lightgrey;\n border-radius: 0.25rem;\n}\n\n.-esm-pathology__ReportComponent__filtersContainer___6OaUS {\n border-radius: 0.25rem;\n margin: 0 1rem;\n padding-top: 4%;\n}\n\n.-esm-pathology__ReportComponent__dropdown___3u271 {\n width: 10%;\n height: 2rem;\n background: transparent;\n border: 1px solid var(--omrs-color-ink-lowest-contrast);\n background-clip: padding-box;\n border-radius: 4px;\n margin: 1rem;\n}\n.-esm-pathology__ReportComponent__dropdown___3u271:disabled {\n opacity: 0.8;\n background: lightgrey;\n cursor: not-allowed;\n}\n.-esm-pathology__ReportComponent__dropdown___3u271:focus {\n border: 2px solid var(--omrs-color-interaction);\n outline: 0;\n}\n.-esm-pathology__ReportComponent__textBox___17N1_ {\n background: transparent;\n border: 1px solid var(--omrs-color-ink-lowest-contrast);\n background-clip: padding-box;\n border-radius: 4px;\n margin: 1rem;\n}\n","",{version:3,sources:["webpack://./src/pathology-report/ReportComponent.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,gBAAgB;EAChB,cAAc;EACd,2BAA2B;EAC3B,sBAAsB;AACxB;;AAEA;EACE,sBAAsB;EACtB,cAAc;EACd,eAAe;AACjB;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,uBAAuB;EACvB,uDAAuD;EACvD,4BAA4B;EAC5B,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,YAAY;EACZ,qBAAqB;EACrB,mBAAmB;AACrB;AACA;EACE,+CAA+C;EAC/C,UAAU;AACZ;AACA;EACE,uBAAuB;EACvB,uDAAuD;EACvD,4BAA4B;EAC5B,kBAAkB;EAClB,YAAY;AACd",sourcesContent:[".tableContainer {\n height: 500px;\n overflow-x: auto;\n margin: 0 1rem;\n border: 2px solid lightgrey;\n border-radius: 0.25rem;\n}\n\n.filtersContainer {\n border-radius: 0.25rem;\n margin: 0 1rem;\n padding-top: 4%;\n}\n\n.dropdown {\n width: 10%;\n height: 2rem;\n background: transparent;\n border: 1px solid var(--omrs-color-ink-lowest-contrast);\n background-clip: padding-box;\n border-radius: 4px;\n margin: 1rem;\n}\n.dropdown:disabled {\n opacity: 0.8;\n background: lightgrey;\n cursor: not-allowed;\n}\n.dropdown:focus {\n border: 2px solid var(--omrs-color-interaction);\n outline: 0;\n}\n.textBox {\n background: transparent;\n border: 1px solid var(--omrs-color-ink-lowest-contrast);\n background-clip: padding-box;\n border-radius: 4px;\n margin: 1rem;\n}\n"],sourceRoot:""}]),s.locals={tableContainer:"-esm-pathology__ReportComponent__tableContainer___YHJce",filtersContainer:"-esm-pathology__ReportComponent__filtersContainer___6OaUS",dropdown:"-esm-pathology__ReportComponent__dropdown___3u271",textBox:"-esm-pathology__ReportComponent__textBox___17N1_"};const l=s},724:(e,t,a)=>{a.d(t,{Z:()=>l});var n=a(15),o=a.n(n),r=a(645),s=a.n(r)()(o());s.push([e.id,".-esm-pathology__pathology__container___3OaBf {\n padding: 2em;\n}\n","",{version:3,sources:["webpack://./src/pathology.css"],names:[],mappings:"AAAA;EACE,YAAY;AACd",sourcesContent:[".container {\n padding: 2em;\n}\n"],sourceRoot:""}]),s.locals={container:"-esm-pathology__pathology__container___3OaBf"};const l=s}}]);
2
- //# sourceMappingURL=66.pih-esm-pathology-app.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"66.pih-esm-pathology-app.js","mappings":"kMAQa,IAAI,IALH,CAEdA,OAAiB,OACjBA,WAAoB,IAMpB,QAAe,YAAkB,G,6FCJpB,IAAI,IALH,CAEd,OAAiB,OACjB,WAAoB,IAMpB,QAAe,YAAkB,GCsD1BC,eAAeC,EAAgBC,GAA0B,MAC9D,MACMC,SADgBC,EAAAA,EAAAA,cAAc,wBACTC,KAAKC,KAAKC,OAAOC,KAO5C,wBANqBJ,EAAAA,EAAAA,cAClB,sBAAqBD,gBAESE,KAAKI,QAAQC,QAC3CC,GAASA,EAAKC,cAAcJ,OAASN,IAEf,UAAzB,aAAO,EAAsBW,MAAML,KAG9BR,eAAec,EAAkBC,GAItC,aAHsBX,EAAAA,EAAAA,cACnB,uBAAsBW,aAEVV,KAA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AAS,CAChC,eAAkB,0DAClB,iBAAoB,4DACpB,SAAY,oDACZ,QAAW,oDAEZ,W,6DCVIH,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAO1F,GAAI,wEAAyE,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,iCAAiC,MAAQ,GAAG,SAAW,sBAAsB,eAAiB,CAAC,sCAAsC,WAAa,MAE/RwF,EAAwBG,OAAS,CAChC,UAAa,gDAEd","sources":["webpack://@pih/esm-pathology-app/./src/pathology.css?9d3a","webpack://@pih/esm-pathology-app/./src/pathology-report/ReportComponent.css?a61d","webpack://@pih/esm-pathology-app/./src/pathology-report/ReportComponent.resource.ts","webpack://@pih/esm-pathology-app/./src/pathology-report/ReportComponent.tsx","webpack://@pih/esm-pathology-app/./src/PathologySystem.tsx","webpack://@pih/esm-pathology-app/./src/pathology-report/ReportComponent.css","webpack://@pih/esm-pathology-app/./src/pathology.css"],"sourcesContent":["import api from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./pathology.css\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import api from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./ReportComponent.css\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","import { openmrsFetch } from \"@openmrs/esm-framework\";\n\nexport interface EncounterResult {\n family_name: string;\n given_name: string;\n middle_name: string;\n patientPhoneNumber: { value: string };\n patientHealthCenter: string;\n patientUuid: string;\n encounterUuid: string;\n encounterId: number;\n personId: number;\n encounterDatetime: Date;\n sampleStatusObs: string;\n referralStatusObs: string;\n sampleDropoffObs: string;\n resultsEncounterId: string;\n}\nexport interface Patient {\n uuid: string;\n}\nexport interface Concept {\n uuid: string;\n name: string;\n display: string;\n}\nexport interface Obs {\n patientUuid: string;\n obsDateTime: string;\n sampleDropoffObsUuid: string;\n referralStatusObsUuid: string;\n sampleStatusObsUuid: string;\n location: string;\n encounterUuid: string;\n valueCodedName: string;\n voided: boolean;\n}\n\n// export async function getPatientEncounters(patientUuid): Promise<Array<EncounterResult>> {\n// const searchPatientEncounters = await openmrsFetch(\n// `/ws/rest/v1/encounter?encounterType=${ENCOUNTERTYPEUUID}&patient=${patientUuid}`,\n// );\n// const fullPatientEncounterData = searchPatientEncounters.data.results.map(async (searchEnc) => {\n// const enc = await openmrsFetch(`/ws/rest/v1/encounter/${searchEnc.uuid}?v=full`);\n// const searchPatient = await openmrsFetch(`/ws/rest/v1/patient/${patientUuid}?v=full`);\n// const retrievedObject = {\n// patientName: searchPatient.data.person.names[0],\n// patientPhoneNumber: searchPatient.data.person.attributes.filter(\n// (attribute) => attribute.attributeType.uuid == PHONENUMBERATTRUUID,\n// )[0],\n// patientHealthCenter: searchPatient.data.person.attributes.filter(\n// (attribute) => attribute.attributeType.uuid == HEALTHCENTERATTRTYPEUUID,\n// )[0],\n// patientUuid: searchPatient.data.uuid,\n// encUuid: enc.data.uuid,\n// encounterDatetime: enc.data.encounterDatetime,\n// sampleStatusObs: enc.data.obs.filter((obs) => obs.concept.uuid === SAMPLESTATUSUUID)[0],\n// referralStatusObs: enc.data.obs.filter((obs) => obs.concept.uuid === REFERRALSTATUSUUID)[0],\n// sampleDropoffObs: enc.data.obs.filter((obs) => obs.concept.uuid === SAMPLEDROPOFFUUID)[0],\n// };\n\n// return retrievedObject;\n// });\n// return Promise.all(fullPatientEncounterData);\n// }\n\nexport async function getUserLocation(healthCenterAttrTypeUUID) {\n const session = await openmrsFetch(`/ws/rest/v1/session`);\n const personUuid = session.data.user.person.uuid;\n const person = await openmrsFetch(\n `/ws/rest/v1/person/${personUuid}/attribute`\n );\n const hcPersonAttribute = person.data.results.filter(\n (attr) => attr.attributeType.uuid === healthCenterAttrTypeUUID\n );\n return hcPersonAttribute[0]?.value.uuid;\n}\n\nexport async function getConceptAnswers(conceptUuid) {\n const concept = await openmrsFetch(\n `/ws/rest/v1/concept/${conceptUuid}?v=full`\n );\n return concept.data.answers;\n}\n\nexport async function getLocations() {\n const location = await openmrsFetch(`/ws/rest/v1/location`);\n\n return location.data.results;\n}\n\n// export async function getPatient(patientUuid): Promise<Patient> {\n// const searchPatient = await openmrsFetch(`/ws/rest/v1/patient/c604dabc-2700-102b-80cb-0017a47871b2?v=full`);\n// return searchPatient.data;\n// }\n\nexport async function getEncounters(\n healthCenterAttrTypeUUID: string,\n pathologyFullAllowedLocationUUID: string\n): Promise<Array<EncounterResult>> {\n const userLocationUUID = await getUserLocation(healthCenterAttrTypeUUID);\n\n let searchEncounter = null;\n if (\n userLocationUUID &&\n userLocationUUID != pathologyFullAllowedLocationUUID\n ) {\n searchEncounter = await openmrsFetch(\n `/ws/rest/v1/reportingrest/reportdata/996cf192-ff54-11eb-a63a-080027ce9ca0?location=${userLocationUUID}`\n );\n } else {\n searchEncounter = await openmrsFetch(\n `/ws/rest/v1/reportingrest/reportdata/996cf192-ff54-11eb-a63a-080027ce9ca0`\n );\n }\n return searchEncounter.data.dataSets[0].rows;\n}\n\nexport async function postSampleDropoffObs(\n obsObject: Obs,\n sampleDropOffconceptUUID: string,\n healthCenterAttrTypeUUID: string,\n yesConceptName: string\n) {\n const ObsObjectTocreate = {\n person: obsObject.patientUuid,\n obsDatetime: new Date().toISOString(),\n concept: sampleDropOffconceptUUID,\n location: await getUserLocation(healthCenterAttrTypeUUID),\n encounter: obsObject.encounterUuid,\n value: yesConceptName,\n voided: false,\n };\n\n const response = await openmrsFetch(\"/ws/rest/v1/obs\", {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: ObsObjectTocreate,\n });\n return response;\n}\n\nexport async function voidSampleDropoff(sampleDropoffObsUuid: string) {\n const ObsObjectTocreate = {\n voided: true,\n };\n\n const response = await openmrsFetch(\n `/ws/rest/v1/obs/${sampleDropoffObsUuid}`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: ObsObjectTocreate,\n }\n );\n\n return response;\n}\n\nexport async function postSampleStatusChangeObs(\n newStatusUuid: string,\n obs: Obs,\n sampleStatusConceptUUID: string,\n healthCenterAttrTypeUUID: string\n) {\n const postBody = {\n person: obs.patientUuid,\n obsDatetime: new Date().toISOString(),\n concept: sampleStatusConceptUUID,\n location: await getUserLocation(healthCenterAttrTypeUUID),\n encounter: obs.encounterUuid,\n value: newStatusUuid,\n voided: false,\n };\n\n const response = await openmrsFetch(\"/ws/rest/v1/obs\", {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: postBody,\n });\n\n return response;\n}\n\nexport async function updateSampleStatusChangeObs(\n newStatus: null | { uuid: string; display: string },\n obsObject: Obs,\n sampleStatusConceptUUID: string,\n healthCenterAttrTypeUUID: string\n) {\n const ObsObjectTocreate = {\n person: obsObject.patientUuid,\n obsDatetime: new Date().toISOString(),\n concept: sampleStatusConceptUUID,\n location: await getUserLocation(healthCenterAttrTypeUUID),\n encounter: obsObject.encounterUuid,\n value: newStatus.uuid,\n voided: newStatus ? false : true,\n };\n\n const response = await openmrsFetch(\n `/ws/rest/v1/obs/${obsObject.sampleStatusObsUuid}`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: ObsObjectTocreate,\n }\n );\n\n return response;\n}\n\nexport async function postReferralStatusChangeObs(\n targetValueUuid: string,\n obsObject: Obs,\n referralStatusConceptUUID: string,\n healthCenterAttrTypeUUID: string\n) {\n const ObsObjectTocreate = {\n person: obsObject.patientUuid,\n obsDatetime: new Date().toISOString(),\n concept: referralStatusConceptUUID,\n location: await getUserLocation(healthCenterAttrTypeUUID),\n encounter: obsObject.encounterUuid,\n value: targetValueUuid,\n voided: false,\n };\n\n const response = await openmrsFetch(\"/ws/rest/v1/obs\", {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: ObsObjectTocreate,\n });\n\n return response;\n}\n\nexport async function updateReferralStatusChangeObs(\n targetValue,\n obsObject: Obs,\n referralStatusConceptUUID,\n healthCenterAttrTypeUUID\n) {\n const ObsObjectTocreate = {\n person: obsObject.patientUuid,\n obsDatetime: new Date().toISOString(),\n concept: referralStatusConceptUUID,\n location: await getUserLocation(healthCenterAttrTypeUUID),\n encounter: obsObject.encounterUuid,\n value: targetValue.uuid,\n voided: targetValue ? false : true,\n };\n\n const response = await openmrsFetch(\n `/ws/rest/v1/obs/${obsObject.referralStatusObsUuid}`,\n {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n },\n body: ObsObjectTocreate,\n }\n );\n\n return response;\n}\n","import React from \"react\";\nimport { useConfig } from \"@openmrs/esm-framework\";\nimport cloneDeep from \"lodash-es/cloneDeep\";\nimport DataTable, {\n Table,\n TableHead,\n TableRow,\n TableHeader,\n TableBody,\n TableCell,\n} from \"carbon-components-react/es/components/DataTable\";\n\nimport styles from \"./ReportComponent.css\";\nimport {\n getUserLocation,\n getConceptAnswers,\n getLocations,\n getEncounters,\n postSampleDropoffObs,\n voidSampleDropoff,\n postSampleStatusChangeObs,\n updateSampleStatusChangeObs,\n postReferralStatusChangeObs,\n updateReferralStatusChangeObs,\n EncounterResult,\n Concept,\n} from \"./ReportComponent.resource\";\nimport { Config } from \"../config-schema\";\n\nconst ReportComponent = () => {\n const config = useConfig() as Config;\n const [userLocation, setUserLocation] = React.useState();\n const [encountersList, setEncountersList] = React.useState<\n Array<EncounterResult>\n >([]);\n const [sendingHospital, setSendingHospital] = React.useState(\"\");\n const [listOfHospitals, setListOfHospitals] = React.useState([]);\n const [sampleStatusAnswers, setSampleStatusAnswers] = React.useState<\n Array<Concept>\n >([]);\n const [referralStatusAnswers, setReferralStatusAnswers] = React.useState<\n Array<Concept>\n >([]);\n const [sampleStatus, setSampleStatus] = React.useState(\"\");\n const [referralStatus, setReferralStatus] = React.useState(\"\");\n const [patientName, setPatientName] = React.useState(\"\");\n const headers = [\n {\n key: \"patientNames\",\n header: \"Patient name\",\n },\n {\n key: \"pathologyRequest\",\n header: \"pathology request\",\n },\n {\n key: \"sendingHospital\",\n header: \"Sending Hospital\",\n },\n {\n key: \"phoneNumber\",\n header: \"Phone number\",\n },\n {\n key: \"sampleStatus\",\n header: \"Sample status\",\n },\n {\n key: \"dateOfRequest\",\n header: \"Date of Request\",\n },\n {\n key: \"referralStatus\",\n header: \"Referral status\",\n },\n {\n key: \"sampleDropOff\",\n header: \"Sample drop off?\",\n },\n {\n key: \"resultsEncounter\",\n header: \"Results\",\n },\n ];\n\n React.useEffect(() => {\n getUserLocation(config.healthCenterAttrTypeUUID).then(setUserLocation);\n getLocations().then(setListOfHospitals);\n getConceptAnswers(config.sampleStatusConceptUUID).then(\n setSampleStatusAnswers\n );\n getConceptAnswers(config.referralStatusConceptUUID).then(\n setReferralStatusAnswers\n );\n getEncounters(\n config.healthCenterAttrTypeUUID,\n config.pathologyFullAllowedLocationUUID\n ).then(setEncountersList);\n }, []);\n\n const filteredEncList = encountersList\n .filter(\n (encList) =>\n !sampleStatus ||\n encList.sampleStatusObs?.toLowerCase() == sampleStatus.toLowerCase()\n )\n .filter(\n (encList) =>\n !referralStatus ||\n encList.referralStatusObs?.toLowerCase() == referralStatus.toLowerCase()\n )\n .filter(\n (encList) =>\n !sendingHospital ||\n encList.patientHealthCenter?.toLowerCase() ==\n sendingHospital.toLowerCase()\n )\n .filter((encList) => {\n if (!patientName) {\n return true;\n } else {\n // Given a patient name filter input, break it up into tokens.\n // Filter to patients for which each token matches.\n // Matching is case-insensitive and matches the beginning of each name.\n const nameTokens = patientName.split(/\\s+/);\n const name = `${encList.family_name} ${encList.middle_name} ${encList.given_name}`;\n return nameTokens.every((token) =>\n new RegExp(\"\\\\b\" + token, \"i\").test(name)\n );\n }\n });\n //replace(/\\s+/g, '');\n // const rows = filteredEncList.map(\n // (encounterInfo) => {\n // return {\n // // patientLink: <a href={`/openmrs/patientDashboard.form?patientId=${encounterInfo.personId}`} >Link</a>,\n // ...\n\n const rows = filteredEncList.map((encounterInfo) => {\n return {\n // rows.push({\n // patientLink: <a href={`/openmrs/patientDashboard.form?patientId=${encounterInfo.personId}`} >Link</a>,\n id: encounterInfo.encounterId,\n patientNames: (\n <a\n data-testid=\"patientNames\"\n href={`/openmrs/patientDashboard.form?patientId=${encounterInfo.personId}`}\n >\n {encounterInfo.family_name}\n {\" \"}\n {encounterInfo.given_name}\n {\" \"}\n {encounterInfo.middle_name}\n </a>\n ),\n pathologyRequest: (\n <a\n href={`/openmrs/module/htmlformentry/htmlFormEntry.form?encounterId=${encounterInfo.encounterId}&mode=VIEW`}\n >\n {\" \"}\n Link{\" \"}\n </a>\n ),\n sendingHospital: encounterInfo.patientHealthCenter,\n phoneNumber: encounterInfo.patientPhoneNumber || \"\",\n sampleStatus: (\n <select\n onChange={(e) =>\n sampleStatusChange(\n {\n uuid: e.target.value,\n display: e.target.options[e.target.selectedIndex].text,\n },\n encounterInfo\n )\n }\n >\n <option value=\"\"></option>\n {sampleStatusAnswers.map((ans) => (\n <option\n data-testid=\"sampleStatus-option\"\n value={ans.uuid}\n key={ans.uuid}\n selected={\n encounterInfo.sampleStatusObs\n ? encounterInfo.sampleStatusObs === ans.display && true\n : false\n }\n >\n {ans.display}\n </option>\n ))}\n </select>\n ),\n dateOfRequest: encounterInfo.encounterDatetime,\n referralStatus: (\n <select\n onChange={(e) =>\n referralStatusChange(\n {\n uuid: e.target.value,\n display: e.target.options[e.target.selectedIndex].text,\n },\n encounterInfo\n )\n }\n >\n <option data-testid=\"referralStatus-option\" value=\"\"></option>\n {referralStatusAnswers.map((ans) => (\n <option\n value={ans.uuid}\n key={ans.uuid}\n selected={\n encounterInfo.referralStatusObs &&\n encounterInfo.referralStatusObs === ans.display\n }\n >\n {ans.display}\n </option>\n ))}\n </select>\n ),\n sampleDropOff: (\n <input\n data-testid=\"sampleDropOff\"\n type=\"checkbox\"\n checked={Boolean(encounterInfo.sampleDropoffObs)}\n onChange={(e) => sampleDropOffChange(encounterInfo)}\n />\n ),\n resultsEncounter: encounterInfo.resultsEncounterId ? (\n <a\n data-testid=\"resultsEncounter\"\n href={`/openmrs/module/htmlformentry/htmlFormEntry.form?encounterId=${encounterInfo.resultsEncounterId}&mode=VIEW`}\n >\n {\" \"}\n Results{\" \"}\n </a>\n ) : (\n (!userLocation ||\n userLocation === config.pathologyFullAllowedLocationUUID) && (\n <a\n href={`/openmrs/module/htmlformentry/htmlFormEntry.form?personId=${encounterInfo.personId}&patientId=${encounterInfo.personId}&returnUrl=&formId=${config.pathologyResultsFromID}&uuid=${encounterInfo.encounterUuid}`}\n >\n {\" \"}\n Fill in results{\" \"}\n </a>\n )\n ),\n };\n });\n\n const sampleDropOffChange = (encounterInfo) => {\n const tempEncList = cloneDeep(encountersList);\n if (!encounterInfo.sampleDropoffObs) {\n postSampleDropoffObs(\n encounterInfo,\n config.sampleDropOffconceptUUID,\n config.healthCenterAttrTypeUUID,\n config.yesConceptUUID\n ).then((response) => {\n if (response.ok) {\n const encIndex = tempEncList.findIndex(\n (enc) => enc.encounterUuid == encounterInfo.encounterUuid\n );\n tempEncList[encIndex].sampleDropoffObs = config.yesConceptName;\n tempEncList[encIndex].sampleDropoffObsUuid = response.data.uuid;\n setEncountersList(tempEncList);\n }\n });\n } else {\n voidSampleDropoff(encounterInfo.sampleDropoffObsUuid).then((response) => {\n if (response.ok) {\n const encIndex = tempEncList.findIndex(\n (enc) => enc.encounterUuid == encounterInfo.encounterUuid\n );\n tempEncList[encIndex].sampleDropoffObs = \"\";\n tempEncList[encIndex].sampleDropoffObsUuid = \"\";\n\n setEncountersList(tempEncList);\n }\n });\n }\n };\n\n const sampleStatusChange = (\n newStatus: { uuid: string; display: string },\n encounterInfo\n ) => {\n const tempEncList = cloneDeep(encountersList);\n if (!encounterInfo.sampleStatusObs) {\n postSampleStatusChangeObs(\n newStatus.uuid,\n encounterInfo,\n config.sampleStatusConceptUUID,\n config.healthCenterAttrTypeUUID\n ).then((response) => {\n if (response.ok) {\n const encIndex = tempEncList.findIndex(\n (enc) => enc.encounterUuid == encounterInfo.encounterUuid\n );\n tempEncList[encIndex].sampleStatusObs = newStatus.display;\n tempEncList[encIndex].sampleStatusObsUuid = response.data.uuid;\n\n setEncountersList(tempEncList);\n } else {\n setEncountersList(tempEncList);\n //Need error message\n }\n });\n } else {\n updateSampleStatusChangeObs(\n newStatus,\n encounterInfo,\n config.sampleStatusConceptUUID,\n config.healthCenterAttrTypeUUID\n ).then((response) => {\n if (response.ok) {\n const encIndex = tempEncList.findIndex(\n (enc) => enc.encounterUuid == encounterInfo.encounterUuid\n );\n tempEncList[encIndex].sampleStatusObs = newStatus.display;\n tempEncList[encIndex].sampleStatusObsUuid = response.data.uuid;\n setEncountersList(tempEncList);\n } else {\n setEncountersList(tempEncList);\n //Need error message\n }\n });\n }\n };\n\n const referralStatusChange = (targetedElem, encounterInfo) => {\n const tempEncList = cloneDeep(encountersList);\n if (!encounterInfo.referralStatusObs) {\n postReferralStatusChangeObs(\n targetedElem.uuid,\n encounterInfo,\n config.referralStatusConceptUUID,\n config.healthCenterAttrTypeUUID\n ).then((response) => {\n if (response.ok) {\n const encIndex = tempEncList.findIndex(\n (enc) => enc.encounterUuid == encounterInfo.encounterUuid\n );\n tempEncList[encIndex].referralStatusObs = targetedElem.display;\n tempEncList[encIndex].referralStatusObsUuid = response.data.uuid;\n setEncountersList(tempEncList);\n } else {\n setEncountersList(tempEncList);\n //Need error message\n }\n });\n } else {\n updateReferralStatusChangeObs(\n targetedElem,\n encounterInfo,\n config.referralStatusConceptUUID,\n config.healthCenterAttrTypeUUID\n ).then((response) => {\n if (response.ok) {\n const encIndex = tempEncList.findIndex(\n (enc) => enc.encounterUuid == encounterInfo.encounterUuid\n );\n tempEncList[encIndex].referralStatusObs = targetedElem.display;\n tempEncList[encIndex].referralStatusObsUuid = response.data.uuid;\n setEncountersList(tempEncList);\n } else {\n setEncountersList(tempEncList);\n //Need error message\n }\n });\n }\n };\n\n return (\n <div>\n <div className={styles.filtersContainer}>\n <label htmlFor=\"sending-hospital\">Sending Hospital </label>\n <select\n id=\"sending-hospital\"\n className={styles.dropdown}\n value={sendingHospital}\n onChange={(e) => setSendingHospital(e.target.value)}\n >\n <option value=\"\"></option>\n {listOfHospitals.map((loc) =>\n userLocation &&\n userLocation !== config.pathologyFullAllowedLocationUUID ? (\n loc.uuid === userLocation ? (\n <option value={loc.display} key={loc.uuid}>\n {loc.display}\n </option>\n ) : null\n ) : (\n <option value={loc.display} key={loc.uuid}>\n {loc.display}\n </option>\n )\n )}\n </select>\n <label htmlFor=\"sample-status\">Sample Status </label>\n <select\n id=\"sample-status\"\n className={styles.dropdown}\n value={sampleStatus}\n onChange={(e) => setSampleStatus(e.target.value)}\n >\n <option value=\"\"></option>\n {sampleStatusAnswers.map((ans) => (\n <option value={ans.display} key={ans.uuid}>\n {ans.display}\n </option>\n ))}\n </select>\n <label htmlFor=\"referral-status\">Referral Status </label>\n <select\n id=\"referral-status\"\n className={styles.dropdown}\n value={referralStatus}\n onChange={(e) => setReferralStatus(e.target.value)}\n >\n <option value=\"\"></option>\n {referralStatusAnswers.map((ans) => (\n <option value={ans.display} key={ans.uuid}>\n {ans.display}\n </option>\n ))}\n </select>\n\n <label htmlFor=\"patient-name\">Patient Name </label>\n <input\n id=\"patient-name\"\n className={styles.textBox}\n type=\"text\"\n onChange={(e) => setPatientName(e.target.value)}\n />\n </div>\n <div className={styles.tableContainer}>\n <DataTable rows={rows} headers={headers}>\n {({ rows, headers, getTableProps, getHeaderProps, getRowProps }) => (\n <Table {...getTableProps()}>\n <TableHead>\n <TableRow>\n {headers.map((header) => (\n <TableHeader {...getHeaderProps({ header })}>\n {header.header}\n </TableHeader>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {rows.map((row) => (\n <TableRow {...getRowProps({ row })}>\n {row.cells.map((cell) => (\n <TableCell key={cell.id}>{cell.value}</TableCell>\n ))}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n )}\n </DataTable>\n </div>\n </div>\n );\n};\n\nexport default ReportComponent;\n","import React from \"react\";\nimport styles from \"./pathology.css\";\nimport ReportComponent from \"./pathology-report/ReportComponent\";\n\nconst PathologySystem = () => {\n return (\n <div className={`omrs-main-content ${styles.container}`}>\n <ReportComponent />\n </div>\n );\n};\nexport default PathologySystem;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".-esm-pathology__ReportComponent__tableContainer___YHJce {\\n height: 500px;\\n overflow-x: auto;\\n margin: 0 1rem;\\n border: 2px solid lightgrey;\\n border-radius: 0.25rem;\\n}\\n\\n.-esm-pathology__ReportComponent__filtersContainer___6OaUS {\\n border-radius: 0.25rem;\\n margin: 0 1rem;\\n padding-top: 4%;\\n}\\n\\n.-esm-pathology__ReportComponent__dropdown___3u271 {\\n width: 10%;\\n height: 2rem;\\n background: transparent;\\n border: 1px solid var(--omrs-color-ink-lowest-contrast);\\n background-clip: padding-box;\\n border-radius: 4px;\\n margin: 1rem;\\n}\\n.-esm-pathology__ReportComponent__dropdown___3u271:disabled {\\n opacity: 0.8;\\n background: lightgrey;\\n cursor: not-allowed;\\n}\\n.-esm-pathology__ReportComponent__dropdown___3u271:focus {\\n border: 2px solid var(--omrs-color-interaction);\\n outline: 0;\\n}\\n.-esm-pathology__ReportComponent__textBox___17N1_ {\\n background: transparent;\\n border: 1px solid var(--omrs-color-ink-lowest-contrast);\\n background-clip: padding-box;\\n border-radius: 4px;\\n margin: 1rem;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/pathology-report/ReportComponent.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,aAAa;EACb,gBAAgB;EAChB,cAAc;EACd,2BAA2B;EAC3B,sBAAsB;AACxB;;AAEA;EACE,sBAAsB;EACtB,cAAc;EACd,eAAe;AACjB;;AAEA;EACE,UAAU;EACV,YAAY;EACZ,uBAAuB;EACvB,uDAAuD;EACvD,4BAA4B;EAC5B,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,YAAY;EACZ,qBAAqB;EACrB,mBAAmB;AACrB;AACA;EACE,+CAA+C;EAC/C,UAAU;AACZ;AACA;EACE,uBAAuB;EACvB,uDAAuD;EACvD,4BAA4B;EAC5B,kBAAkB;EAClB,YAAY;AACd\",\"sourcesContent\":[\".tableContainer {\\n height: 500px;\\n overflow-x: auto;\\n margin: 0 1rem;\\n border: 2px solid lightgrey;\\n border-radius: 0.25rem;\\n}\\n\\n.filtersContainer {\\n border-radius: 0.25rem;\\n margin: 0 1rem;\\n padding-top: 4%;\\n}\\n\\n.dropdown {\\n width: 10%;\\n height: 2rem;\\n background: transparent;\\n border: 1px solid var(--omrs-color-ink-lowest-contrast);\\n background-clip: padding-box;\\n border-radius: 4px;\\n margin: 1rem;\\n}\\n.dropdown:disabled {\\n opacity: 0.8;\\n background: lightgrey;\\n cursor: not-allowed;\\n}\\n.dropdown:focus {\\n border: 2px solid var(--omrs-color-interaction);\\n outline: 0;\\n}\\n.textBox {\\n background: transparent;\\n border: 1px solid var(--omrs-color-ink-lowest-contrast);\\n background-clip: padding-box;\\n border-radius: 4px;\\n margin: 1rem;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"tableContainer\": \"-esm-pathology__ReportComponent__tableContainer___YHJce\",\n\t\"filtersContainer\": \"-esm-pathology__ReportComponent__filtersContainer___6OaUS\",\n\t\"dropdown\": \"-esm-pathology__ReportComponent__dropdown___3u271\",\n\t\"textBox\": \"-esm-pathology__ReportComponent__textBox___17N1_\"\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".-esm-pathology__pathology__container___3OaBf {\\n padding: 2em;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/pathology.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,YAAY;AACd\",\"sourcesContent\":[\".container {\\n padding: 2em;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"container\": \"-esm-pathology__pathology__container___3OaBf\"\n};\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["options","async","getUserLocation","healthCenterAttrTypeUUID","personUuid","openmrsFetch","data","user","person","uuid","results","filter","attr","attributeType","value","getConceptAnswers","conceptUuid","answers","config","useConfig","userLocation","setUserLocation","React","encountersList","setEncountersList","sendingHospital","setSendingHospital","listOfHospitals","setListOfHospitals","sampleStatusAnswers","setSampleStatusAnswers","referralStatusAnswers","setReferralStatusAnswers","sampleStatus","setSampleStatus","referralStatus","setReferralStatus","patientName","setPatientName","then","getLocations","sampleStatusConceptUUID","referralStatusConceptUUID","pathologyFullAllowedLocationUUID","userLocationUUID","searchEncounter","dataSets","rows","getEncounters","encList","sampleStatusObs","toLowerCase","referralStatusObs","patientHealthCenter","nameTokens","split","name","family_name","middle_name","given_name","every","token","RegExp","test","map","encounterInfo","id","encounterId","patientNames","href","personId","pathologyRequest","phoneNumber","patientPhoneNumber","onChange","e","sampleStatusChange","target","display","selectedIndex","text","ans","key","selected","dateOfRequest","encounterDatetime","referralStatusChange","sampleDropOff","type","checked","Boolean","sampleDropoffObs","sampleDropOffChange","resultsEncounter","resultsEncounterId","pathologyResultsFromID","encounterUuid","tempEncList","cloneDeep","sampleDropoffObsUuid","method","headers","body","voided","voidSampleDropoff","response","ok","encIndex","findIndex","enc","obsObject","sampleDropOffconceptUUID","yesConceptName","ObsObjectTocreate","patientUuid","obsDatetime","Date","toISOString","concept","location","encounter","postSampleDropoffObs","yesConceptUUID","newStatus","sampleStatusObsUuid","updateSampleStatusChangeObs","newStatusUuid","obs","postBody","postSampleStatusChangeObs","targetedElem","targetValue","referralStatusObsUuid","updateReferralStatusChangeObs","targetValueUuid","postReferralStatusChangeObs","className","styles","htmlFor","loc","DataTable","header","getTableProps","getHeaderProps","getRowProps","Table","TableHead","TableRow","TableHeader","TableBody","row","cells","cell","TableCell","___CSS_LOADER_EXPORT___","push","module","locals"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- System.register(["@openmrs/esm-framework","react","carbon-components"],(function(e,t){var o={},r={},n={};return Object.defineProperty(r,"__esModule",{value:!0}),{setters:[function(e){o.Type=e.Type,o.defineConfigSchema=e.defineConfigSchema,o.getAsyncLifecycle=e.getAsyncLifecycle,o.openmrsFetch=e.openmrsFetch,o.useConfig=e.useConfig},function(e){Object.keys(e).forEach((function(t){r[t]=e[t]}))},function(e){n.settings=e.settings}],execute:function(){e((()=>{var e,i,a={722:(e,t,o)=>{const r=o(905).R;t.s=function(e){if(e||(e=1),!o.y.meta||!o.y.meta.url)throw console.error("__system_context__",o.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");o.p=r(o.y.meta.url,e)}},905:(e,t,o)=>{t.R=function(e,t){var o=document.createElement("a");o.href=e;for(var r="/"===o.pathname[0]?o.pathname:"/"+o.pathname,n=0,i=r.length;n!==t&&i>=0;)"/"===r[--i]&&n++;if(n!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+n+") in the URL path "+e);var a=r.slice(0,i+1);return o.protocol+"//"+o.host+a};Number.isInteger},979:(e,t,o)=>{var r={"./en.json":[574,574]};function n(e){if(!o.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],n=t[0];return o.e(t[1]).then((()=>o(n)))}n.keys=()=>Object.keys(r),n.id=979,e.exports=n},489:e=>{"use strict";e.exports=o},434:e=>{"use strict";e.exports=n},954:e=>{"use strict";e.exports=r}},s={};function c(e){var t=s[e];if(void 0!==t)return t.exports;var o=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(o.exports,o,o.exports,c),o.loaded=!0,o.exports}c.m=a,c.y=t,c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var o in t)c.o(t,o)&&!c.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce(((t,o)=>(c.f[o](e,t),t)),[])),c.u=e=>e+".pih-esm-pathology-app.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},i="@pih/esm-pathology-app:",c.l=(t,o,r,n)=>{if(e[t])e[t].push(o);else{var a,s;if(void 0!==r)for(var p=document.getElementsByTagName("script"),l=0;l<p.length;l++){var d=p[l];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==i+r){a=d;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,c.nc&&a.setAttribute("nonce",c.nc),a.setAttribute("data-webpack",i+r),a.src=t),e[t]=[o];var u=(o,r)=>{a.onerror=a.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((e=>e(r))),o)return o(r)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),s&&document.head.appendChild(a)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),c.p="",(()=>{var e={179:0};c.f.j=(t,o)=>{var r=c.o(e,t)?e[t]:void 0;if(0!==r)if(r)o.push(r[2]);else{var n=new Promise(((o,n)=>r=e[t]=[o,n]));o.push(r[2]=n);var i=c.p+c.u(t),a=new Error;c.l(i,(o=>{if(c.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var n=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;a.message="Loading chunk "+t+" failed.\n("+n+": "+i+")",a.name="ChunkLoadError",a.type=n,a.request=i,r[1](a)}}),"chunk-"+t,t)}};var t=(t,o)=>{var r,n,[i,a,s]=o,p=0;if(i.some((t=>0!==e[t]))){for(r in a)c.o(a,r)&&(c.m[r]=a[r]);s&&s(c)}for(t&&t(o);p<i.length;p++)n=i[p],c.o(e,n)&&e[n]&&e[n][0](),e[i[p]]=0},o=self.webpackChunk_pih_esm_pathology_app=self.webpackChunk_pih_esm_pathology_app||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var p={};return(0,c(722).s)(1),(()=>{"use strict";c.r(p),c.d(p,{backendDependencies:()=>r,importTranslation:()=>o,setupOpenMRS:()=>n});var e=c(489);const t={pathologyEncTypeUUID:{_type:e.Type.String,_default:"4d911f5c-26fe-102b-80cb-0017a47871b2",_description:"This is to determine the UUID of the Pathology encounterType in the instance"},healthCenterAttrTypeUUID:{_type:e.Type.String,_default:"8d87236c-c2cc-11de-8d13-0010c6dffd0f",_description:"This is to determine the UUID of the Health center attribute type in the instance"},pathologyFullAllowedLocationUUID:{_type:e.Type.String,_default:"38c4b94b-97a6-4f2c-bca6-c28a37cf60ed",_description:"This is to determine the location allowed to view all other location data"},sampleStatusConceptUUID:{_type:e.Type.String,_default:"3ce163d8-26fe-102b-80cb-0017a47871b2",_description:"This is to determine the UUID of the sample status concept in the instance"},referralStatusConceptUUID:{_type:e.Type.String,_default:"3cd93302-26fe-102b-80cb-0017a47871b2",_description:"This is to determine the UUID of the referral status concept in the instance"},sampleDropOffconceptUUID:{_type:e.Type.String,_default:"13662f27-9be5-4595-8bab-07b0e859d9f4",_description:"This is to determine the UUID of the sample drop off concept in the instance"},yesConceptUUID:{_type:e.Type.String,_default:"3cd6f600-26fe-102b-80cb-0017a47871b2",_description:"This is to determine the UUID of the Yes concept in the instance"},yesConceptName:{_type:e.Type.String,_default:"YES",_description:"This is to determine the Name of the Yes concept in the instance"},pathologyResultsFromID:{_type:e.Type.Number,_default:131,_description:"This is to determine the ID of the pathology results form in the instance"}},o=c(979),r={fhir2:"^1.2.0","webservices.rest":"^2.2.0"};function n(){const o="@pih/esm-pathology-app",r={featureName:"pathology-app",moduleName:o};return(0,e.defineConfigSchema)(o,t),{pages:[{load:(0,e.getAsyncLifecycle)((()=>Promise.all([c.e(633),c.e(66)]).then(c.bind(c,66))),r),route:"pathology"}]}}})(),p})())}}}));
2
- //# sourceMappingURL=pih-esm-pathology-app.js.map
@@ -1,100 +0,0 @@
1
- {
2
- "chunks": [
3
- {
4
- "rendered": true,
5
- "initial": false,
6
- "entry": false,
7
- "recorded": false,
8
- "size": 25364,
9
- "sizes": {
10
- "javascript": 25364
11
- },
12
- "names": [],
13
- "idHints": [],
14
- "runtime": [
15
- "main"
16
- ],
17
- "files": [
18
- "66.pih-esm-pathology-app.js"
19
- ],
20
- "auxiliaryFiles": [
21
- "66.pih-esm-pathology-app.js.map"
22
- ],
23
- "hash": "e3a26543992417b66ab3",
24
- "childrenByOrder": {}
25
- },
26
- {
27
- "rendered": true,
28
- "initial": true,
29
- "entry": true,
30
- "recorded": false,
31
- "size": 14583,
32
- "sizes": {
33
- "javascript": 8077,
34
- "runtime": 6506
35
- },
36
- "names": [
37
- "main"
38
- ],
39
- "idHints": [],
40
- "runtime": [
41
- "main"
42
- ],
43
- "files": [
44
- "pih-esm-pathology-app.js"
45
- ],
46
- "auxiliaryFiles": [
47
- "pih-esm-pathology-app.js.map"
48
- ],
49
- "hash": "e14920a9544b278e7254",
50
- "childrenByOrder": {}
51
- },
52
- {
53
- "rendered": true,
54
- "initial": false,
55
- "entry": false,
56
- "recorded": false,
57
- "size": 12,
58
- "sizes": {
59
- "javascript": 12
60
- },
61
- "names": [],
62
- "idHints": [],
63
- "runtime": [
64
- "main"
65
- ],
66
- "files": [
67
- "574.pih-esm-pathology-app.js"
68
- ],
69
- "auxiliaryFiles": [],
70
- "hash": "a93c196af9b472913355",
71
- "childrenByOrder": {}
72
- },
73
- {
74
- "rendered": true,
75
- "initial": false,
76
- "entry": false,
77
- "recorded": false,
78
- "reason": "split chunk (cache group: defaultVendors)",
79
- "size": 2333372,
80
- "sizes": {
81
- "javascript": 2333372
82
- },
83
- "names": [],
84
- "idHints": [
85
- "vendors"
86
- ],
87
- "runtime": [
88
- "main"
89
- ],
90
- "files": [
91
- "633.pih-esm-pathology-app.js"
92
- ],
93
- "auxiliaryFiles": [
94
- "633.pih-esm-pathology-app.js.map"
95
- ],
96
- "hash": "6a94ba173a83958b37c2",
97
- "childrenByOrder": {}
98
- }
99
- ]
100
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"pih-esm-pathology-app.js","mappings":"+cAAIA,EACAC,E,iBCDJ,MAAMC,EAAmB,SAEzBC,EAAQ,EAAiB,SAAwBC,GAY7C,GAXGA,IACHA,EAAe,IAUV,IAAmBC,OAAS,IAAmBA,KAAKC,IAEvD,MADAC,QAAQC,MAAM,qBAAsB,KAC9BC,MACJ,uHAIJ,IAA0BP,EACxB,IAAmBG,KAAKC,IACxBF,K,cCuDND,EAAQ,EAlCR,SAA0BO,EAAWC,GAKnC,IAAIC,EAAIC,SAASC,cAAc,KAC/BF,EAAEG,KAAOL,EAKT,IAHA,IAAIM,EAA6B,MAAlBJ,EAAEI,SAAS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,KAAM,IAC3D8B,EAAmBvD,KAAOgD,EAAqBvB,KAAK,KAAM8B,EAAmBvD,KAAKyB,KAAK8B,K,mBCnFvFE,EAFuB,UAER,G,qHCcR,MAAMC,EAAe,CAC1BC,qBAAsB,CACpBC,MAAOC,EAAAA,KAAAA,OACPC,SAAU,uCACVC,aACE,gFAEJC,yBAA0B,CACxBJ,MAAOC,EAAAA,KAAAA,OACPC,SAAU,uCACVC,aACE,qFAEJE,iCAAkC,CAChCL,MAAOC,EAAAA,KAAAA,OACPC,SAAU,uCACVC,aACE,6EAEJG,wBAAyB,CACvBN,MAAOC,EAAAA,KAAAA,OACPC,SAAU,uCACVC,aACE,8EAEJI,0BAA2B,CACzBP,MAAOC,EAAAA,KAAAA,OACPC,SAAU,uCACVC,aACE,gFAEJK,yBAA0B,CACxBR,MAAOC,EAAAA,KAAAA,OACPC,SAAU,uCACVC,aACE,gFAEJM,eAAgB,CACdT,MAAOC,EAAAA,KAAAA,OACPC,SAAU,uCACVC,aACE,oEAEJO,eAAgB,CACdV,MAAOC,EAAAA,KAAAA,OACPC,SAAU,MACVC,aACE,oEAGJQ,uBAAwB,CACtBX,MAAOC,EAAAA,KAAAA,OACPC,SAAU,IACVC,aACE,8ECvDAS,EAAoBC,EAAAA,KAapBC,EAAsB,CAC1BC,MAAO,SACP,mBAAoB,UAetB,SAASC,IACP,MAAMC,EAAa,yBAEbC,EAAU,CACdC,YAAa,gBACbF,WAAAA,GAKF,OAFAG,EAAAA,EAAAA,oBAAmBH,EAAYnB,GAExB,CACLuB,MAAO,CACL,CACEC,MAAMC,EAAAA,EAAAA,oBAAkB,IAAM,oDAA6BL,GAC3DM,MAAO,iB","sources":["webpack://@pih/esm-pathology-app/webpack/runtime/load script","webpack://@pih/esm-pathology-app/./node_modules/systemjs-webpack-interop/auto-public-path/auto-public-path.js","webpack://@pih/esm-pathology-app/./node_modules/systemjs-webpack-interop/public-path.js","webpack://@pih/esm-pathology-app//home/joshua/Projects/pih-esm-pathology-app/translations|lazy|nonrecursive|/.json$/","webpack://@pih/esm-pathology-app/external system \"@openmrs/esm-framework\"","webpack://@pih/esm-pathology-app/external system \"carbon-components\"","webpack://@pih/esm-pathology-app/external system \"react\"","webpack://@pih/esm-pathology-app/webpack/bootstrap","webpack://@pih/esm-pathology-app/webpack/runtime/__system_context__","webpack://@pih/esm-pathology-app/webpack/runtime/compat get default export","webpack://@pih/esm-pathology-app/webpack/runtime/define property getters","webpack://@pih/esm-pathology-app/webpack/runtime/ensure chunk","webpack://@pih/esm-pathology-app/webpack/runtime/get javascript chunk filename","webpack://@pih/esm-pathology-app/webpack/runtime/global","webpack://@pih/esm-pathology-app/webpack/runtime/hasOwnProperty shorthand","webpack://@pih/esm-pathology-app/webpack/runtime/make namespace object","webpack://@pih/esm-pathology-app/webpack/runtime/node module decorator","webpack://@pih/esm-pathology-app/webpack/runtime/publicPath","webpack://@pih/esm-pathology-app/webpack/runtime/jsonp chunk loading","webpack://@pih/esm-pathology-app/./node_modules/systemjs-webpack-interop/auto-public-path/1.js","webpack://@pih/esm-pathology-app/./src/config-schema.ts","webpack://@pih/esm-pathology-app/./src/index.ts"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"@pih/esm-pathology-app:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","const resolveDirectory = require(\"../public-path\").resolveDirectory;\n\nexports.autoPublicPath = function autoPublicPath(rootDirLevel) {\n if (!rootDirLevel) {\n rootDirLevel = 1;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n if (typeof __system_context__ === \"undefined\") {\n throw Error(\n \"systemjs-webpack-interop requires webpack@>=5.0.0-beta.15 and output.libraryTarget set to 'system'\"\n );\n }\n\n if (!__system_context__.meta || !__system_context__.meta.url) {\n console.error(\"__system_context__\", __system_context__);\n throw Error(\n \"systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(\n __system_context__.meta.url,\n rootDirLevel\n );\n }\n};\n","exports.setPublicPath = function setPublicPath(\n systemjsModuleName,\n rootDirectoryLevel\n) {\n if (!rootDirectoryLevel) {\n rootDirectoryLevel = 1;\n }\n if (\n typeof systemjsModuleName !== \"string\" ||\n systemjsModuleName.trim().length === 0\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName) must be called with a non-empty string 'systemjsModuleName'\"\n );\n }\n\n if (\n typeof rootDirectoryLevel !== \"number\" ||\n rootDirectoryLevel <= 0 ||\n isNaN(rootDirectoryLevel) ||\n !isInteger(rootDirectoryLevel)\n ) {\n throw Error(\n \"systemjs-webpack-interop: setPublicPath(systemjsModuleName, rootDirectoryLevel) must be called with a positive integer 'rootDirectoryLevel'\"\n );\n }\n\n var moduleUrl;\n try {\n moduleUrl = window.System.resolve(systemjsModuleName);\n if (!moduleUrl) {\n throw Error();\n }\n } catch (err) {\n throw Error(\n \"systemjs-webpack-interop: There is no such module '\" +\n systemjsModuleName +\n \"' in the SystemJS registry. Did you misspell the name of your module?\"\n );\n }\n\n __webpack_public_path__ = resolveDirectory(moduleUrl, rootDirectoryLevel);\n};\n\nfunction resolveDirectory(urlString, rootDirectoryLevel) {\n // Our friend IE11 doesn't support new URL()\n // https://github.com/single-spa/single-spa/issues/612\n // https://gist.github.com/jlong/2428561\n\n var a = document.createElement(\"a\");\n a.href = urlString;\n\n var pathname = a.pathname[0] === \"/\" ? a.pathname : \"/\" + a.pathname;\n var numDirsProcessed = 0,\n index = pathname.length;\n while (numDirsProcessed !== rootDirectoryLevel && index >= 0) {\n var char = pathname[--index];\n if (char === \"/\") {\n numDirsProcessed++;\n }\n }\n\n if (numDirsProcessed !== rootDirectoryLevel) {\n throw Error(\n \"systemjs-webpack-interop: rootDirectoryLevel (\" +\n rootDirectoryLevel +\n \") is greater than the number of directories (\" +\n numDirsProcessed +\n \") in the URL path \" +\n urlString\n );\n }\n\n var finalPath = pathname.slice(0, index + 1);\n\n return a.protocol + \"//\" + a.host + finalPath;\n}\n\nexports.resolveDirectory = resolveDirectory;\n\n// borrowed from https://github.com/parshap/js-is-integer/blob/master/index.js\nvar isInteger =\n Number.isInteger ||\n function isInteger(val) {\n return typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n };\n","var map = {\n\t\"./en.json\": [\n\t\t574,\n\t\t574\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 979;\nmodule.exports = webpackAsyncContext;","module.exports = __WEBPACK_EXTERNAL_MODULE__489__;","module.exports = __WEBPACK_EXTERNAL_MODULE__434__;","module.exports = __WEBPACK_EXTERNAL_MODULE__954__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.y = __system_context__;","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".pih-esm-pathology-app.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk_pih_esm_pathology_app\"] = self[\"webpackChunk_pih_esm_pathology_app\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","const autoPublicPath = require(\"./auto-public-path\").autoPublicPath;\n\nautoPublicPath(1);\n","import { Type, validator } from \"@openmrs/esm-framework\";\n\n/**\n *\n * In OpenMRS Microfrontends, all config parameters are optional. Thus,\n * all elements must have a reasonable default. A good default is one\n * that works well with the reference application.\n *\n * To understand the schema below, please read the configuration system\n * documentation:\n * https://openmrs.github.io/openmrs-esm-core/#/main/config\n * Note especially the section \"How do I make my module configurable?\"\n * https://openmrs.github.io/openmrs-esm-core/#/main/config?id=im-developing-an-esm-module-how-do-i-make-it-configurable\n * and the Schema Reference\n * https://openmrs.github.io/openmrs-esm-core/#/main/config?id=schema-reference\n */\nexport const configSchema = {\n pathologyEncTypeUUID: {\n _type: Type.String,\n _default: \"4d911f5c-26fe-102b-80cb-0017a47871b2\",\n _description:\n \"This is to determine the UUID of the Pathology encounterType in the instance\",\n },\n healthCenterAttrTypeUUID: {\n _type: Type.String,\n _default: \"8d87236c-c2cc-11de-8d13-0010c6dffd0f\",\n _description:\n \"This is to determine the UUID of the Health center attribute type in the instance\",\n },\n pathologyFullAllowedLocationUUID: {\n _type: Type.String,\n _default: \"38c4b94b-97a6-4f2c-bca6-c28a37cf60ed\",\n _description:\n \"This is to determine the location allowed to view all other location data\",\n },\n sampleStatusConceptUUID: {\n _type: Type.String,\n _default: \"3ce163d8-26fe-102b-80cb-0017a47871b2\",\n _description:\n \"This is to determine the UUID of the sample status concept in the instance\",\n },\n referralStatusConceptUUID: {\n _type: Type.String,\n _default: \"3cd93302-26fe-102b-80cb-0017a47871b2\",\n _description:\n \"This is to determine the UUID of the referral status concept in the instance\",\n },\n sampleDropOffconceptUUID: {\n _type: Type.String,\n _default: \"13662f27-9be5-4595-8bab-07b0e859d9f4\",\n _description:\n \"This is to determine the UUID of the sample drop off concept in the instance\",\n },\n yesConceptUUID: {\n _type: Type.String,\n _default: \"3cd6f600-26fe-102b-80cb-0017a47871b2\",\n _description:\n \"This is to determine the UUID of the Yes concept in the instance\",\n },\n yesConceptName: {\n _type: Type.String,\n _default: \"YES\",\n _description:\n \"This is to determine the Name of the Yes concept in the instance\",\n },\n\n pathologyResultsFromID: {\n _type: Type.Number,\n _default: 131,\n _description:\n \"This is to determine the ID of the pathology results form in the instance\",\n },\n};\n\nexport type Config = {\n pathologyEncTypeUUID: string;\n healthCenterAttrTypeUUID: string;\n pathologyFullAllowedLocationUUID: string;\n sampleStatusConceptUUID: string;\n referralStatusConceptUUID: string;\n sampleDropOffconceptUUID: string;\n yesConceptUUID: string;\n yesConceptName: string;\n pathologyResultsFromID: number;\n};\n","/**\n * This is the entrypoint file of the application. It communicates the\n * important features of this microfrontend to the app shell. It\n * connects the app shell to the React application(s) that make up this\n * microfrontend.\n */\n\nimport { getAsyncLifecycle, defineConfigSchema } from \"@openmrs/esm-framework\";\nimport { configSchema } from \"./config-schema\";\n\n/**\n * This tells the app shell how to obtain translation files: that they\n * are JSON files in the directory `../translations` (which you should\n * see in the directory structure).\n */\nconst importTranslation = require.context(\n \"../translations\",\n false,\n /.json$/,\n \"lazy\"\n);\n\n/**\n * This tells the app shell what versions of what OpenMRS backend modules\n * are expected. Warnings will appear if suitable modules are not\n * installed. The keys are the part of the module name after\n * `openmrs-module-`; e.g., `openmrs-module-fhir2` becomes `fhir2`.\n */\nconst backendDependencies = {\n fhir2: \"^1.2.0\",\n \"webservices.rest\": \"^2.2.0\",\n};\n\n/**\n * This function performs any setup that should happen at microfrontend\n * load-time (such as defining the config schema) and then returns an\n * object which describes how the React application(s) should be\n * rendered.\n *\n * In this example, our return object contains a single page definition.\n * It tells the app shell that the default export of `greeter.tsx`\n * should be rendered when the route matches `hello`. The full route\n * will be `openmrsSpaBase() + 'hello'`, which is usually\n * `/openmrs/spa/hello`.\n */\nfunction setupOpenMRS() {\n const moduleName = \"@pih/esm-pathology-app\";\n\n const options = {\n featureName: \"pathology-app\",\n moduleName,\n };\n\n defineConfigSchema(moduleName, configSchema);\n\n return {\n pages: [\n {\n load: getAsyncLifecycle(() => import(\"./PathologySystem\"), options),\n route: \"pathology\",\n },\n ],\n };\n}\n\nexport { backendDependencies, importTranslation, setupOpenMRS };\n"],"names":["inProgress","dataWebpackPrefix","resolveDirectory","exports","rootDirLevel","meta","url","console","error","Error","urlString","rootDirectoryLevel","a","document","createElement","href","pathname","numDirsProcessed","index","length","finalPath","slice","protocol","host","Number","isInteger","map","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","code","ids","id","keys","Object","module","__WEBPACK_EXTERNAL_MODULE__489__","__WEBPACK_EXTERNAL_MODULE__434__","__WEBPACK_EXTERNAL_MODULE__954__","__webpack_module_cache__","moduleId","cachedModule","undefined","loaded","__webpack_modules__","call","m","y","__system_context__","n","getter","__esModule","d","definition","key","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","this","Function","window","obj","prop","prototype","hasOwnProperty","l","done","push","script","needAttach","scripts","getElementsByTagName","i","s","getAttribute","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","appendChild","r","Symbol","toStringTag","value","nmd","paths","children","p","installedChunks","j","installedChunkData","promise","reject","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","autoPublicPath","configSchema","pathologyEncTypeUUID","_type","Type","_default","_description","healthCenterAttrTypeUUID","pathologyFullAllowedLocationUUID","sampleStatusConceptUUID","referralStatusConceptUUID","sampleDropOffconceptUUID","yesConceptUUID","yesConceptName","pathologyResultsFromID","importTranslation","require","backendDependencies","fhir2","setupOpenMRS","moduleName","options","featureName","defineConfigSchema","pages","load","getAsyncLifecycle","route"],"sourceRoot":""}