1import{bc as j,y as A,x as V,fC as N,bY as $,b_ as T,e as L,a3 as z,ak as q,p as Y,bu as J,co as K,q as Q,A as P,aD as W,v as X,b$ as i,B as Z,c as f,o as l,a as u,b as v,w as D,d as I,F as ee,f as n,H as R,a1 as ae,S as C,T as U,g as F,t as te,n as M,M as x,ab as oe}from"#entry";import{C as H}from"./DBr935Js.js";import{C as ie}from"./CC2DrIxU.js";import{_ as ne}from"./j33zdX0X.js";import{_ as le}from"./C8rJVANA.js";import{_ as se}from"./DnZ_rPm1.js";import{u as re}from"./D_Qo2lJz.js";import{u as de}from"./Ce9YkjM_.js";import{_ as ce}from"./DlAUqK2U.js";import"./DcGhxoNh.js";import"./B5f7C4HF.js";import"./Ltqd2rAr.js";import"./D5Td5aVQ.js";import"./Cara-jTD.js";import"./CWY3R6PV.js";import"./DUTCMUHG.js";import"./8sjTgCsn.js";import"./DlP9uqBQ.js";import"./kC3kxybx.js";import"./CvtDo0MO.js";import"./Dmhids7v.js";import"./BBoVSIOO.js";import"./DippbqLN.js";import"./C3DONDKa.js";import"./DC66rAUS.js";const me=j("obstetric-gynaecology-examination",()=>{const w={pallor:"",jaundice:"",edema:"",lymphadenopathy:"",inspection:"",palpation:"",fundalHeight:"",fetalHeartRate:"",inspectionExternalGenitalia:"",speculumExamination:"",bimanualExamination:"",diagnosis:[],managementPlan:"",lifestyleAdvice:"",procedures:"",referrals:"",followUpPlan:"",nameOfDoctorOrMidwife:"",dateOfDocumentation:""},a=A({...w}),_=A({selectOptions:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],icdCategories:[{id:"448895267",label:"ICD Entity"},{id:"455013390",label:"ICD Category"},{id:"1920852714",label:"ICD Extension Code"}],icdItemsByCategory:{448895267:[{code:"1168452782",name:"Malaria without parasitological confirmation"},{code:"1318266453",name:"Other congenital malaria"},{code:"1390000001",name:"Antimalarial"},{code:"1390000002",name:"Plasmodium malariae"},{code:"1390000003",name:"Malaria due to Plasmodium ovale"},{code:"1390000004",name:"Personal history of malaria"},{code:"1390000005",name:"Malaria due to simian plasmodia"},{code:"1390000006",name:"Congenital falciparum malaria"}],455013390:[{code:"2100000001",name:"Infectious diseases"},{code:"2100000002",name:"Endocrine, nutritional or metabolic diseases"}],1920852714:[{code:"9900000001",name:"Extension modifier example A"},{code:"9900000002",name:"Extension modifier example B"}]}}),c=V(!1),{mutate:E}=de(N);return{isLoading:c,form:a,submitForm:async O=>{if(!a.nameOfDoctorOrMidwife)throw new Error("Name of doctor/midwife.");const h=Object.keys(a);let m=0;if(h.forEach(p=>{const y=a[p];Array.isArray(y)?y.length>0&&m++:y&&m++}),m<3)throw new Error("Please fill at least one other field before submitting.");if(new Date(a.dateOfDocumentation)>new Date)throw new Error("Date of documentation cannot be in the future.");c.value=!0;try{const p={patient_id:O,pallor:a.pallor,jaundice:a.jaundice,edema:a.edema,lymphadenopathy:a.lymphadenopathy,inspection:a.inspection,palpation:a.palpation,fundal_height:a.fundalHeight,fetal_heart_rate:a.fetalHeartRate,inspection_of_external_genitalia:a.inspectionExternalGenitalia,speculum_examination:a.speculumExamination,bimanual_examination:a.bimanualExamination,diagnosis:a.diagnosis,management_plan:a.managementPlan,lifestyle_advice:a.lifestyleAdvice,procedures_or_surgeries:a.procedures,referrals:a.referrals,follow_up_plan:a.followUpPlan,name_and_designation_of_attending_doctor_or_midwife:a.nameOfDoctorOrMidwife};return await E({input:p})}catch(p){throw console.error("Obstetric & Gynecology Exam error",p),p}finally{c.value=!1}},saveForm:()=>{},resetForm:()=>{Object.assign(a,$(w))},options:_}},{persist:{storage:T()}}),pe={class:"space-y-3.5"},ue={class:"flex items-center gap-2"},ye={key:0,class:"list-disc pl-5 text-[#767676]"},fe={class:"text-lg lg:text-xl font-bold mt-16"},ge={class:"absolute bottom-0 z-100 xl:right-[19vw] lg:right-[28vw] right-[5vw] py-6 flex justify-end gap-4"},be=L({__name:"obstetric-gynaecology-examination",setup(w){const{createCustomBreadcrumbs:a,setBreadcrumbs:_}=z(),c=V(!1),{selectedUser:E}=q(re()),s=me(),t=s.form,{user:k}=Y();J(()=>{k.value&&(t.nameOfDoctorOrMidwife=k.value.name)});const{selectOptions:O}=K(s.options),h=Q(),m=P(()=>h.params.patientId??E.value?.user?.patient?.id??null),S=P(()=>[{to:"/emr/dashboard",label:"Home",order:0},{to:`/emr/${m.value}/obstetric-gynaecology-examination`,label:"Medical Record",order:1}]),g=W(),p=X(),y=async()=>{const b=Array.isArray(m.value)?m.value[0]:m.value;if(!b){g.add({title:"Error",description:"Patient ID is missing",color:"error"});return}try{(await s.submitForm(b))?.queued?g.add({title:"Saved offline",description:"No connection - this examination is saved on this device and will sync automatically once you're back online",color:"warning"}):g.add({title:"Success",description:"Obstetric Physical Examination saved successfully",color:"success"}),s.resetForm(),p.back()}catch(o){g.add({title:"Error",description:o.message||"An error occurred while saving",color:"error"})}},B=P(()=>[{id:"selectField",fields:[{key:"pallor",label:"Pallor",placeholder:"Select any",type:"select",model:i(t,"pallor")},{key:"jaundice",label:"Jaundice",placeholder:"Select any",type:"select",model:i(t,"jaundice")},{key:"edema",label:"Edema",placeholder:"Select any",type:"select",model:i(t,"edema")},{key:"lymphadenopathy",label:"Lymphadenopathy",placeholder:"Select any",type:"select",model:i(t,"lymphadenopathy")}]},{id:"inputField",title:"Abdominal Examination",fields:[{key:"inspection",label:"Inspection (distension, scars, striae)",type:"text",model:i(t,"inspection")},{key:"palpation",label:"Palpation (tenderness, palpable masses)",type:"text",model:i(t,"palpation")},{key:"fundalHeight",label:"Fundal Height (in cm, corresponds to gestational age)",type:"text",model:i(t,"fundalHeight")},{key:"fetalHeartRate",label:"Fetal Hearth Rate (FHR)",type:"text",model:i(t,"fetalHeartRate")}]},{id:"pelvicExamination",title:"Pelvic Examination (if needed)",fields:[{key:"inspectionExternalGenitalia",label:"Inspection of external genitalia",type:"textarea",model:i(t,"inspectionExternalGenitalia")},{key:"speculumExamination",label:"Speculum Examination (cervix, vaginal walls, discharge)",type:"textarea",model:i(t,"speculumExamination")},{key:"bimanualExamination",label:"Bimanual Examination (uterus size, position, adnexal masses, cervical motion tenderness)",type:"textarea",model:i(t,"bimanualExamination")}]},{id:"diagnosis",title:"Diagnosis / Impression",fields:[{key:"diagnosis",label:"Diagnosis",type:"diagnosis"},{key:"managementPlan",label:"Management Plan",type:"textarea",model:i(t,"managementPlan")}]},{id:"treatmentPlan",title:"Treatment Plan",fields:[{key:"medications",label:"Medications",type:"medications"},{key:"lifestyleAdvice",label:"Lifestyle Advice (diet, exercise, hygiene, sexual health counseling)",type:"textarea",model:i(t,"lifestyleAdvice")},{key:"procedures",label:"Procedures / Surgeries (if needed)",type:"textarea",model:i(t,"procedures")},{key:"referrals",label:"Referrals (to fertility specialist, oncologist, endocrinologist)",type:"textarea",model:i(t,"referrals")},{key:"followUpPlan",label:"Follow-up Plan (next antenatal visit, further investigations)",type:"textarea",model:i(t,"followUpPlan")}]},{id:"signature",title:"Healthcare Providerâs Signature and Stamp",fields:[{key:"nameOfDoctorOrMidwife",label:"Name and designation of the attending doctor/midwife",placeholder:"Enter doctor/midwife full name",type:"text",model:i(t,"nameOfDoctorOrMidwife"),disabled:!0}]}]);return Z(()=>{const b=a(S.value,h.path);_(b)}),(b,o)=>{const G=ee;return l(),f(C,null,[u("div",pe,[u("div",ue,[o[4]||(o[4]=u("h1",{class:"text-[#1A1A1A] text-[28px] leading-[100%] font-extrabold"},"Obstetric and Gynaecology",-1)),v(n(R),{type:"button",variant:"link",class:"!p-0 underline hover:no-underline font-medium text-xs shrink-0",onClick:o[0]||(o[0]=r=>c.value=!0)},{leading:D(()=>[v(G,{name:"i-heroicons-information-circle",class:"w-5 h-5 shrink-0"})]),default:D(()=>[o[3]||(o[3]=I(" Info ",-1))]),_:1})]),o[6]||(o[6]=u("h1",{class:"text-primary font-[500] text-[24px] leading-[100%]"},"Obstetric and Gynaecology Examination",-1)),u("form",{onSubmit:ae(y,["prevent"])},[(l(!0),f(C,null,U(n(B),r=>(l(),f("div",{key:r.id,class:"space-y-6"}
1,[r.title?(l(),f("ul",ye,[u("li",fe,te(r.title),1)])):F("",!0),u("div",{class:M(["space-y-6 mt-10",{"grid grid-cols-1 md:grid-cols-2 gap-x-[36px] gap-y-[34px] ":["selectField","inputField"].includes(r.id)}])},[(l(!0),f(C,null,U(r.fields,e=>(l(),f("div",{key:e.key},[e.type==="select"?(l(),x(n(ie),{key:0,"model-value":e.model?.value||null,label:e.label,placeholder:e.placeholder,options:n(O),"custom-class":"w-full",size:"lg","onUpdate:modelValue":d=>e.model&&(e.model.value=d)},null,8,["model-value","label","placeholder","options","onUpdate:modelValue"])):F("",!0),e.type==="diagnosis"?(l(),x(se,{key:1,modelValue:n(t).diagnosis,"onUpdate:modelValue":o[1]||(o[1]=d=>n(t).diagnosis=d),categories:n(s).options.icdCategories,"items-by-category":n(s).options.icdItemsByCategory,"show-selected-section":!0},null,8,["modelValue","categories","items-by-category"])):e.type==="textarea"?(l(),x(n(ne),{key:2,"model-value":e.model?.value||"",label:e.label,rows:6,"show-voice-to-text":"",class:M({"md:col-span-2":["selectField","inputField"].includes(r.id)}),"onUpdate:modelValue":d=>e.model&&(e.model.value=d)},null,8,["model-value","label","class","onUpdate:modelValue"])):e.type==="text"?(l(),x(n(H),{key:3,"model-value":e.model?.value||"",placeholder:e.placeholder,type:e.type,label:e.label,disabled:e.disabled,class:"w-full","onUpdate:modelValue":d=>e.model&&(e.model.value=d)},null,8,["model-value","placeholder","type","label","disabled","onUpdate:modelValue"])):e.type==="date"?(l(),x(n(H),{key:4,"model-value":e.model?.value||"",placeholder:e.placeholder,type:e.type,label:e.label,max:e.max,class:"w-full","onUpdate:modelValue":d=>e.model&&(e.model.value=d)},null,8,["model-value","placeholder","type","label","max","onUpdate:modelValue"])):F("",!0)]))),128))],2)]))),128)),u("div",ge,[v(n(R),{type:"submit",color:"primary",size:"lg",class:"px-6",loading:n(s).isLoading,disabled:n(s).isLoading},{default:D(()=>[...o[5]||(o[5]=[I("Save",-1)])]),_:1},8,["loading","disabled"])])],32)]),v(n(le),{open:n(c),"onUpdate:open":o[2]||(o[2]=r=>oe(c)?c.value=r:null),title:"Physical Examination (General Examination)",overview:"The Physical Examination section allows clinicians to document the patient's general physical condition and key examination findings observed during the consultation. These findings support clinical assessment, diagnosis, and treatment planning.","what-you-can-do":["Record the patient's general appearance and level of consciousness.","Document vital signs such as temperature, pulse, blood pressure, respiratory rate, and oxygen saturation.","Assess nutritional status, hydration, and mobility.","Note abnormalities observed during the general examination.","Record relevant clinical findings to support diagnosis and ongoing care."],"why-it-matters":"A well-documented physical examination provides objective clinical evidence, supports accurate diagnosis, monitors changes in a patient's condition, and ensures continuity of care across healthcare providers.","helpful-tip":"Record only findings observed during the examination. If a body system was not examined or has no significant findings, document it appropriately according to your facility's clinical documentation standards."},null,8,["open"])],64)}}}),Te=ce(be,[["__scopeId","data-v-535359c8"]]);export{Te as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.