felicity-lims/felicity/templates/static/assets/PatientInfo-d5b67a4d.js
2023-11-10 18:48:39 +02:00

1 line
5.5 KiB
JavaScript

import{_ as k,D as P,p as C,m as j,L as D}from"./shipment-53265c2d.js";import{f as I,G as S,v as x,aj as N,ag as l,h as i,k as a,u as e,B as d,y as n,x as t,D as o,A,F as B,ak as E,_ as M}from"./_plugin-vue_export-helper-dacf3d65.js";import{h as R,o as T,a as L}from"./constants-743d82a1.js";import{b as p}from"./runtime-dom.esm-bundler-98433118.js";const O={class:"bg-white rounded-sm shadow-sm hover:shadow-lg duration-500 px-4 sm:px-6 md:px-2 py-4"},U={key:0,class:"py-4 text-center"},V={key:1,class:"grid grid-cols-12 gap-3"},F={class:"sm:col-span-2 text-center hidden sm:block"},Y={class:"inline-block font-bold text-medium mb-2"},G={class:"flex flex-col items-center justify-center mx-auto py-2 w-4/5 2lg:w-3/5 rounded-sm bg-sky-800"},$={class:"inline-block font-semibold text-white text-sm lg:text-md"},q={class:"inline-block font-bold text-2xl text-white my-2"},z=t("div",{class:"inline-block font-semibold text-white text-sm lg:text-md"}," Yrs Old ",-1),H={class:"col-span-12 sm:col-start-3 sm:col-end-13 px-3 sm:px-0"},J={class:"flex justify-between sm:text-sm md:text-md lg:text-lg"},K={class:"font-bold text-gray-800"},Q={class:"font-medium text-md"},W=t("hr",null,null,-1),X={class:"grid grid-cols-3 gap-x-8 mt-2"},Z={class:"col-span-1"},tt=t("h1",{class:"uppercase text-sm font-semibold"},"patient Origin",-1),et=t("hr",{class:"my-1"},null,-1),st={class:"flex justify-between items-center mt-2"},ot=t("span",{class:"text-gray-800 text-sm font-semibold"},"Country",-1),nt={class:"text-gray-600 text-sm md:text-md"},it={class:"flex justify-between items-center mt-2"},at=t("span",{class:"text-gray-800 text-sm font-semibold"},"District:",-1),ct={class:"text-gray-600 text-sm md:text-md"},dt={class:"flex justify-between items-center mt-2"},lt=t("span",{class:"text-gray-800 text-sm font-semibold"},"Province: ",-1),mt={class:"text-gray-600 text-sm md:text-md"},rt={class:"col-span-1"},_t=t("h1",{class:"uppercase text-sm font-semibold"},"Primary Referrer",-1),xt=t("hr",{class:"my-1"},null,-1),pt={class:"flex justify-between items-center mt-2"},ht=t("span",{class:"text-gray-800 text-sm font-semibold"},"Client",-1),ft={class:"text-gray-600 text-sm md:text-md"},ut={class:"flex justify-between items-center mt-2"},yt=t("span",{class:"text-gray-800 text-sm font-semibold"},"District:",-1),gt={class:"text-gray-600 text-sm md:text-md"},vt={class:"flex justify-between items-center mt-2"},bt=t("span",{class:"text-gray-800 text-sm font-semibold"},"Province: ",-1),wt={class:"text-gray-600 text-sm md:text-md"},kt={class:"col-span-1 mr-2"},Pt={class:"flex justify-between items-center mt-2"},Ct=t("span",{class:"text-gray-800 whitespace-nowrap text-sm font-semibold"},"Client Patient ID: ",-1),jt={class:"text-gray-600 text-sm md:text-md"},Dt={class:"flex justify-between items-center mt-2"},It=t("span",{class:"text-gray-800 whitespace-nowrap text-sm font-semibold"},"Mobile: ",-1),St={class:"text-gray-600 text-sm md:text-md"},Nt={class:"flex justify-between items-center mt-2"},At=t("span",{class:"text-gray-800 whitespace-nowrap text-sm font-semibold"},"Consent SMS: ",-1),Bt={class:"text-gray-600 text-sm md:text-md"},Et={class:"text-gray-800 whitespace-nowrap text-sm font-semibold"},Mt={class:"text-gray-600 text-sm md:text-md"},Rt=I({__name:"PatientInfo",emits:["editPatient"],setup(Tt,{emit:h}){const f=S(()=>k(()=>import("./LoadingMessage-097e117a.js"),["assets/LoadingMessage-097e117a.js","assets/_plugin-vue_export-helper-dacf3d65.js"])),u=P(),y=C(),{patient:s,fetchingPatient:g}=j(y),v=m=>{h("editPatient",m)};return(m,r)=>{const _=x("font-awesome-icon"),b=x("router-link"),w=N("motion-slide-top");return l((i(),a("div",O,[e(g)?(i(),a("div",U,[d(e(f),{message:"Fetching patient details ..."})])):(i(),a("div",V,[n(" Meta Column "),t("div",F,[t("div",Y,o(e(s)?.patientId),1),n(" Age "),t("div",G,[t("div",$,o(e(s)?.gender),1),t("div",q,o(e(s)?.age),1),z])]),n(" Summary Column "),t("div",H,[t("div",J,[t("span",K,o(e(s)?.firstName?.toUpperCase())+" "+o(e(s)?.lastName?.toUpperCase()),1),t("div",null,[t("span",Q,o(e(D)(e(s)?.dateOfBirth,!1)),1),l(t("button",{onClick:r[0]||(r[0]=c=>v(e(s))),class:"p-1 ml-2 border-white border text-gray-500 text-md rounded-sm transition duration-300 hover:text-sky-800 focus:outline-none"},[d(_,{icon:"fa-edit"})],512),[[p,R(L.UPDATE,T.PATIENT)]]),l(d(b,{to:{name:"patient-detail",params:{patientUid:e(s)?.uid}},class:"p-1 ml-2 border-white border text-gray-500 rounded-sm transition duration-300 hover:text-sky-800 focus:outline-none"},{default:A(()=>[d(_,{icon:"fa-left-right"})]),_:1},8,["to"]),[[p,e(u).fullPath.includes("patients-compact")]])])]),W,t("div",X,[t("div",Z,[tt,et,n(" Client Details "),t("div",st,[ot,t("span",nt,o(e(s)?.country?.name),1)]),t("div",it,[at,t("span",ct,o(e(s)?.district?.name),1)]),t("div",dt,[lt,t("span",mt,o(e(s)?.province?.name),1)])]),t("div",rt,[_t,xt,n(" Client Details "),t("div",pt,[ht,t("span",ft,o(e(s)?.client?.name),1)]),t("div",ut,[yt,t("span",gt,o(e(s)?.client?.district?.name),1)]),t("div",vt,[bt,t("span",wt,o(e(s)?.client?.district?.province?.name),1)])]),t("div",kt,[n(" Identifiers "),t("div",Pt,[Ct,t("span",jt,o(e(s)?.clientPatientId),1)]),t("div",Dt,[It,t("span",St,o(e(s)?.phoneMobile),1)]),t("div",Nt,[At,t("span",Bt,o(e(s)?.consentSms?"Yes":"No"),1)]),(i(!0),a(B,null,E(e(s)?.identifications,c=>(i(),a("div",{class:"flex justify-between items-center mt-2",key:c.uid},[t("span",Et,o(c?.identification?.name)+": ",1),t("span",Mt,o(c?.value),1)]))),128))])])])]))])),[[w]])}}}),Ft=M(Rt,[["__file","/home/aurthurm/Development/felicity-lims/webapp/views/patient/PatientInfo.vue"]]);export{Ft as default};