diff --git a/app/components/app/assessment-education/entry.vue b/app/components/app/assessment-education/entry.vue
new file mode 100644
index 00000000..33cfa826
--- /dev/null
+++ b/app/components/app/assessment-education/entry.vue
@@ -0,0 +1,215 @@
+
+
+
+
+
diff --git a/app/components/app/assessment-education/fields/base-checkbox.vue b/app/components/app/assessment-education/fields/base-checkbox.vue
new file mode 100644
index 00000000..a002feb4
--- /dev/null
+++ b/app/components/app/assessment-education/fields/base-checkbox.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+ {
+ const newValue = [...(value || [])]
+ if (checked) {
+ if (!newValue.includes(item.id)) newValue.push(item.id)
+ } else {
+ const idx = newValue.indexOf(item.id)
+ if (idx > -1) newValue.splice(idx, 1)
+ }
+ handleChange(newValue)
+ }
+ "
+ />
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
diff --git a/app/components/app/assessment-education/fields/base-select.vue b/app/components/app/assessment-education/fields/base-select.vue
new file mode 100644
index 00000000..965f0c08
--- /dev/null
+++ b/app/components/app/assessment-education/fields/base-select.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/assessment-education/fields/checkbox-general.vue b/app/components/app/assessment-education/fields/checkbox-general.vue
new file mode 100644
index 00000000..80ca534e
--- /dev/null
+++ b/app/components/app/assessment-education/fields/checkbox-general.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/app/components/app/assessment-education/fields/checkbox-special.vue b/app/components/app/assessment-education/fields/checkbox-special.vue
new file mode 100644
index 00000000..0754726c
--- /dev/null
+++ b/app/components/app/assessment-education/fields/checkbox-special.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/app/components/app/assessment-education/fields/index.ts b/app/components/app/assessment-education/fields/index.ts
new file mode 100644
index 00000000..f813c494
--- /dev/null
+++ b/app/components/app/assessment-education/fields/index.ts
@@ -0,0 +1,4 @@
+export { default as BaseSelect } from './base-select.vue'
+export { default as CheckboxGeneral } from './checkbox-general.vue'
+export { default as CheckboxSpecial } from './checkbox-special.vue'
+export { default as SelectAssessmentCode } from './select-assessment-code.vue'
diff --git a/app/components/app/assessment-education/fields/select-assessment-code.vue b/app/components/app/assessment-education/fields/select-assessment-code.vue
new file mode 100644
index 00000000..9d006152
--- /dev/null
+++ b/app/components/app/assessment-education/fields/select-assessment-code.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/assessment-education/list-history.cfg.ts b/app/components/app/assessment-education/list-history.cfg.ts
new file mode 100644
index 00000000..c02b3a52
--- /dev/null
+++ b/app/components/app/assessment-education/list-history.cfg.ts
@@ -0,0 +1,75 @@
+import { defineAsyncComponent } from 'vue'
+
+import { format } from 'date-fns'
+import { id } from 'date-fns/locale'
+
+import type { Config, RecComponent } from '~/components/pub/my-ui/data-table'
+import type { ActionReportData } from '~/components/app/action-report/sample'
+const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
+
+export const config: Config = {
+ cols: [{ width: 120 }, { width: 120 }, { width: 120 }, { width: 120 }, { width: 120 }, { width: 50 }],
+
+ headers: [
+ [
+ { label: 'TANGGAL' },
+ { label: 'INFORMASI UMUM' },
+ { label: 'EDUKASI KHUSUS' },
+ { label: 'RENCANA EDUKASI' },
+ { label: 'PELAKSANAAN' },
+ { label: 'AKSI' },
+ ],
+ ],
+
+ keys: ['reportAt', 'dpjp', 'operator', 'operationAt', 'operationType', 'action'],
+
+ delKeyNames: [
+ { key: 'id', label: 'ID' },
+ { key: 'dokter', label: 'Dokter' },
+ { key: 'reportAt', label: 'Tanggal Laporan' },
+ ],
+
+ parses: {
+ reportAt: (rec: unknown): unknown => {
+ const attr = (rec as ActionReportData).reportAt
+ const result = format(new Date(attr), 'd MMMM yyyy, HH:mm', { locale: id })
+
+ return result
+ },
+ operationAt: (rec: unknown): unknown => {
+ return '1 Rencana Edukasi'
+ },
+ system: (rec: unknown): unknown => {
+ return 'Cito'
+ },
+ operator: (rec: unknown): unknown => {
+ return '2 Edukasi dipilih'
+ },
+ billing: (rec: unknown): unknown => {
+ return 'General'
+ },
+ operationType: (rec: unknown): unknown => {
+ return '-'
+ },
+ dpjp: (rec: unknown): unknown => {
+ return '3 Informasi Dipilih'
+ },
+ parent: (rec: unknown): unknown => {
+ const recX = rec as any
+ return recX.parent?.name || '-'
+ },
+ },
+
+ components: {
+ action(rec, idx) {
+ const res: RecComponent = {
+ idx,
+ rec: rec as object,
+ component: action,
+ }
+ return res
+ },
+ },
+
+ htmls: {},
+}
diff --git a/app/components/app/assessment-education/list-history.vue b/app/components/app/assessment-education/list-history.vue
new file mode 100644
index 00000000..6ad7dd81
--- /dev/null
+++ b/app/components/app/assessment-education/list-history.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
diff --git a/app/components/app/assessment-education/list.cfg.ts b/app/components/app/assessment-education/list.cfg.ts
new file mode 100644
index 00000000..c02b3a52
--- /dev/null
+++ b/app/components/app/assessment-education/list.cfg.ts
@@ -0,0 +1,75 @@
+import { defineAsyncComponent } from 'vue'
+
+import { format } from 'date-fns'
+import { id } from 'date-fns/locale'
+
+import type { Config, RecComponent } from '~/components/pub/my-ui/data-table'
+import type { ActionReportData } from '~/components/app/action-report/sample'
+const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
+
+export const config: Config = {
+ cols: [{ width: 120 }, { width: 120 }, { width: 120 }, { width: 120 }, { width: 120 }, { width: 50 }],
+
+ headers: [
+ [
+ { label: 'TANGGAL' },
+ { label: 'INFORMASI UMUM' },
+ { label: 'EDUKASI KHUSUS' },
+ { label: 'RENCANA EDUKASI' },
+ { label: 'PELAKSANAAN' },
+ { label: 'AKSI' },
+ ],
+ ],
+
+ keys: ['reportAt', 'dpjp', 'operator', 'operationAt', 'operationType', 'action'],
+
+ delKeyNames: [
+ { key: 'id', label: 'ID' },
+ { key: 'dokter', label: 'Dokter' },
+ { key: 'reportAt', label: 'Tanggal Laporan' },
+ ],
+
+ parses: {
+ reportAt: (rec: unknown): unknown => {
+ const attr = (rec as ActionReportData).reportAt
+ const result = format(new Date(attr), 'd MMMM yyyy, HH:mm', { locale: id })
+
+ return result
+ },
+ operationAt: (rec: unknown): unknown => {
+ return '1 Rencana Edukasi'
+ },
+ system: (rec: unknown): unknown => {
+ return 'Cito'
+ },
+ operator: (rec: unknown): unknown => {
+ return '2 Edukasi dipilih'
+ },
+ billing: (rec: unknown): unknown => {
+ return 'General'
+ },
+ operationType: (rec: unknown): unknown => {
+ return '-'
+ },
+ dpjp: (rec: unknown): unknown => {
+ return '3 Informasi Dipilih'
+ },
+ parent: (rec: unknown): unknown => {
+ const recX = rec as any
+ return recX.parent?.name || '-'
+ },
+ },
+
+ components: {
+ action(rec, idx) {
+ const res: RecComponent = {
+ idx,
+ rec: rec as object,
+ component: action,
+ }
+ return res
+ },
+ },
+
+ htmls: {},
+}
diff --git a/app/components/app/assessment-education/list.vue b/app/components/app/assessment-education/list.vue
new file mode 100644
index 00000000..6ad7dd81
--- /dev/null
+++ b/app/components/app/assessment-education/list.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
diff --git a/app/components/app/assessment-education/sample.ts b/app/components/app/assessment-education/sample.ts
new file mode 100644
index 00000000..b067e859
--- /dev/null
+++ b/app/components/app/assessment-education/sample.ts
@@ -0,0 +1,54 @@
+import { addWeeks, formatISO } from 'date-fns'
+
+export type ActionReportData = {
+ id: number
+ reportAt: string
+ operationAt: string
+ noRm: string
+ noBill: string
+ nama: string
+ jk: string
+ alamat: string
+ klinik: string
+ dokter: string
+ caraBayar: string
+ rujukan: string
+ ketRujukan: string
+ asal: string
+}
+
+export const sampleRows: ActionReportData[] = [
+ {
+ id: 1,
+ reportAt: formatISO(addWeeks(new Date(), -1)),
+ operationAt: formatISO(addWeeks(new Date(), 1)),
+ noRm: 'RM23311224',
+ noBill: '-',
+ nama: 'Ahmad Baidowi',
+ jk: 'L',
+ alamat: 'Jl Jaksa Agung S. No. 9',
+ klinik: 'Penyakit dalam',
+ dokter: 'Dr. Andreas Sutaji',
+ caraBayar: 'JKN',
+ rujukan: 'Faskes BPJS',
+ ketRujukan: 'RUMAH SAKIT - RS Lawang Medika - Malang',
+ asal: 'Rawat Jalan Reguler',
+ },
+ {
+ id: 2,
+ reportAt: new Date().toISOString(),
+ operationAt: formatISO(addWeeks(new Date(), 2)),
+ noRm: 'RM23455667',
+ noBill: '-',
+ nama: 'Abraham Sulaiman',
+ jk: 'L',
+ alamat: 'Purwantoro, Blimbing',
+ klinik: 'Penyakit dalam',
+ dokter: 'Dr. Andreas Sutaji',
+ caraBayar: 'JKN',
+ rujukan: 'Faskes BPJS',
+ ketRujukan: 'RUMAH SAKIT - RS Lawang Medika - Malang',
+ asal: 'Rawat Jalan Reguler',
+ },
+ // tambahkan lebih banyak baris contoh jika perlu
+]
diff --git a/app/components/app/person-contact/entry-form.vue b/app/components/app/person-contact/entry-form.vue
index 431a3c79..bcbc8aea 100644
--- a/app/components/app/person-contact/entry-form.vue
+++ b/app/components/app/person-contact/entry-form.vue
@@ -39,7 +39,7 @@ defineExpose({
{{ props.title || 'Kontak Pasien' }}
diff --git a/app/components/content/assessment-education/entry.vue b/app/components/content/assessment-education/entry.vue
new file mode 100644
index 00000000..a127b804
--- /dev/null
+++ b/app/components/content/assessment-education/entry.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/components/content/assessment-education/form.vue b/app/components/content/assessment-education/form.vue
new file mode 100644
index 00000000..4553d7d5
--- /dev/null
+++ b/app/components/content/assessment-education/form.vue
@@ -0,0 +1,74 @@
+
+
+
+ console.log(val)"
+ @back="goBack"
+ @error="
+ (err: Error) => {
+ toast({
+ title: 'Terjadi Kesalahan',
+ description: err.message,
+ variant: 'destructive',
+ })
+ }
+ "
+ :doctors="doctors"
+ :initialValues="reportData"
+ />
+
+
+
diff --git a/app/components/content/assessment-education/list.vue b/app/components/content/assessment-education/list.vue
new file mode 100644
index 00000000..91f5ab5d
--- /dev/null
+++ b/app/components/content/assessment-education/list.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
Asesmen Kebutuhan Edukasi
+
Manajemen asesmen kebutuhan edukasi pasien rawat jalan
+
+
+
+
+
+
+
+
+
+
+ handleActionRemove(
+ recItem.id,
+ () => {
+ router.go(0)
+ },
+ toast,
+ )
+ "
+ @cancel=""
+ >
+
+ {{ console.log(JSON.stringify(record)) }}
+
+
+ {{ field.label }}:
+ {{ record[field.key] }}
+
+
+
+
+
diff --git a/app/components/content/assessment-education/sample.ts b/app/components/content/assessment-education/sample.ts
new file mode 100644
index 00000000..f368eea6
--- /dev/null
+++ b/app/components/content/assessment-education/sample.ts
@@ -0,0 +1,68 @@
+export default {
+ operatorTeam: {
+ dpjpId: -1,
+ operatorName: 'Julian Alvarez',
+ assistantOperatorName: 'Arda Guller',
+ instrumentNurseName: 'Kenan Yildiz',
+ surgeryDate: '2025-11-13T14:29:00',
+ actionDiagnosis: 'Sprei gratisnya mana',
+ },
+ procedures: [
+ {
+ id: -1,
+ name: 'Ndase mumet',
+ code: 'CX1',
+ },
+ ],
+ operationExecution: {
+ surgeryType: 'khusus',
+ billingCode: 'local',
+ operationSystem: 'cito',
+ surgeryCleanType: 'kotor',
+ surgeryNumber: 'retry',
+ birthPlaceNote: 'out3',
+ personWeight: 100,
+ operationDescription: 'asdsadsa1',
+ birthRemark: 'lahir_hidup',
+
+ operationStartAt: '2025-11-13T14:29:00',
+ operationEndAt: '2025-11-13T17:29:00',
+
+ anesthesiaStartAt: '2025-11-13T11:29:00',
+ anesthesiaEndAt: '2025-11-13T18:29:00',
+ },
+ bloodInput: {
+ type: 'tc',
+ amount: {
+ prc: null,
+ wb: null,
+ ffp: null,
+ tc: 3243324,
+ },
+ },
+ implant: {
+ brand: 'Samsung',
+ name: 'S.Komedi',
+ companionName: 'When ya',
+ },
+ specimen: {
+ destination: 'pa',
+ },
+ tissueNotes: [
+ {
+ note: 'Anjai',
+ },
+ {
+ note: 'Ciee Kaget',
+ },
+ {
+ note: 'Baper',
+ },
+ {
+ note: 'Saltink weeh',
+ },
+ {
+ note: 'Kaburrr',
+ },
+ ],
+}
diff --git a/app/components/content/assessment-education/view.vue b/app/components/content/assessment-education/view.vue
new file mode 100644
index 00000000..97508a22
--- /dev/null
+++ b/app/components/content/assessment-education/view.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
diff --git a/app/components/pub/my-ui/content-switcher/content-switcher.vue b/app/components/pub/my-ui/content-switcher/content-switcher.vue
index 267d94c1..3b79f193 100644
--- a/app/components/pub/my-ui/content-switcher/content-switcher.vue
+++ b/app/components/pub/my-ui/content-switcher/content-switcher.vue
@@ -1,33 +1,40 @@
-
-
-
-
+
+
+
-
@@ -35,24 +42,45 @@ function switchActiveTab() {
diff --git a/app/components/pub/my-ui/doc-entry/block.vue b/app/components/pub/my-ui/doc-entry/block.vue
index 7e217542..b51ad72a 100644
--- a/app/components/pub/my-ui/doc-entry/block.vue
+++ b/app/components/pub/my-ui/doc-entry/block.vue
@@ -53,8 +53,8 @@ const settingClass = computed(() => {
'[&_.cell]:2xl:flex',
][getBreakpointIdx(props.cellFlexPoint)]
cls += ' [&_.label]:flex-shrink-0 ' + [
- '[&_.label]:md:w-16 [&_.label]:xl:w-20',
- '[&_.label]:md:w-20 [&_.label]:xl:w-24',
+ '[&_.label]:md:w-12 [&_.label]:xl:w-20',
+ '[&_.label]:md:w-16 [&_.label]:xl:w-24',
'[&_.label]:md:w-24 [&_.label]:xl:w-32',
'[&_.label]:md:w-32 [&_.label]:xl:w-40',
'[&_.label]:md:w-44 [&_.label]:xl:w-52',
diff --git a/app/components/pub/my-ui/menus/submenu.vue b/app/components/pub/my-ui/menus/submenu.vue
index 8d60f742..ecfeb054 100644
--- a/app/components/pub/my-ui/menus/submenu.vue
+++ b/app/components/pub/my-ui/menus/submenu.vue
@@ -4,10 +4,6 @@ import { type EncounterItem } from "~/handlers/encounter-init.handler";
const props = defineProps<{
initialActiveMenu: string
data: EncounterItem[]
- canCreate?: boolean
- canRead?: boolean
- canUpdate?: boolean
- canDelete?: boolean
}>()
const activeMenu = ref(props.initialActiveMenu)
@@ -42,12 +38,7 @@ function changeMenu(value: string) {
class="flex-1 rounded-md border bg-white p-4 shadow-sm dark:bg-neutral-950">
+ v-bind="data.find((m) => m.id === activeMenu)?.props" />
diff --git a/app/composables/useQueryCRUD.ts b/app/composables/useQueryCRUD.ts
index ee993a8e..481142aa 100644
--- a/app/composables/useQueryCRUD.ts
+++ b/app/composables/useQueryCRUD.ts
@@ -30,17 +30,15 @@ export function useQueryCRUD(modeKey: string = 'mode', recordIdKey: string = 're
})
const goToEntry = (myRecord_id?: any) => {
- if(myRecord_id) {
- crudQueryParams.value = { mode: 'entry', recordId: myRecord_id }
+ if (myRecord_id) {
+ crudQueryParams.value.mode = 'entry'
+ crudQueryParams.value.recordId = myRecord_id
} else {
- crudQueryParams.value = { mode: 'entry', recordId: undefined }
+ crudQueryParams.value.mode = 'entry'
+ crudQueryParams.value.recordId = undefined
}
}
- const goToDetail = (myRecord_id: string|number) => {
- crudQueryParams.value = { mode: 'list', recordId: String(myRecord_id) }
- }
-
const backToList = () => {
delete route.query[recordIdKey]
router.push({
@@ -52,7 +50,7 @@ export function useQueryCRUD(modeKey: string = 'mode', recordIdKey: string = 're
})
}
- return { crudQueryParams, goToEntry, goToDetail, backToList }
+ return { crudQueryParams, goToEntry, backToList }
}
export function useQueryCRUDMode(key: string = 'mode') {
diff --git a/app/handlers/assessment-education.handler.ts b/app/handlers/assessment-education.handler.ts
new file mode 100644
index 00000000..80b24f40
--- /dev/null
+++ b/app/handlers/assessment-education.handler.ts
@@ -0,0 +1,24 @@
+// Handlers
+import { genCrudHandler } from '~/handlers/_handler'
+
+// Services
+import { create, update, remove } from '~/services/assessment-education.service'
+
+export const {
+ recId,
+ recAction,
+ recItem,
+ isReadonly,
+ isProcessing,
+ isFormEntryDialogOpen,
+ isRecordConfirmationOpen,
+ onResetState,
+ handleActionSave,
+ handleActionEdit,
+ handleActionRemove,
+ handleCancelForm,
+} = genCrudHandler({
+ create,
+ update,
+ remove,
+})
diff --git a/app/handlers/encounter-init.handler.ts b/app/handlers/encounter-init.handler.ts
index e6d1726d..57445c62 100644
--- a/app/handlers/encounter-init.handler.ts
+++ b/app/handlers/encounter-init.handler.ts
@@ -46,15 +46,18 @@ const ApLabOrderAsync = defineAsyncComponent(() => import('~/components/content/
const CprjAsync = defineAsyncComponent(() => import('~/components/content/cprj/entry.vue'))
const RadiologyAsync = defineAsyncComponent(() => import('~/components/content/radiology-order/main.vue'))
const ConsultationAsync = defineAsyncComponent(() => import('~/components/content/consultation/list.vue'))
-const DocUploadListAsync = defineAsyncComponent(() => import('~/components/content/document-upload/main.vue'))
+const DocUploadListAsync = defineAsyncComponent(() => import('~/components/content/document-upload/list.vue'))
const GeneralConsentListAsync = defineAsyncComponent(() => import('~/components/content/general-consent/entry.vue'))
-const ResumeListAsync = defineAsyncComponent(() => import('~/components/content/resume/main.vue'))
-const ControlLetterListAsync = defineAsyncComponent(() => import('~/components/content/control-letter/main.vue'))
-const KfrListAsync = defineAsyncComponent(() => import('~/components/content/kfr/main.vue'))
-const PrbListAsync = defineAsyncComponent(() => import('~/components/content/prb/main.vue'))
-const SurgeryReportListAsync = defineAsyncComponent(() => import('~/components/content/surgery-report/main.vue'))
-const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/content/vaccine-data/main.vue'))
+const ResumeListAsync = defineAsyncComponent(() => import('~/components/content/resume/list.vue'))
+const ControlLetterListAsync = defineAsyncComponent(() => import('~/components/content/control-letter/list.vue'))
+const KfrListAsync = defineAsyncComponent(() => import('~/components/content/kfr/list.vue'))
+const PrbListAsync = defineAsyncComponent(() => import('~/components/content/prb/list.vue'))
+const SurgeryReportListAsync = defineAsyncComponent(() => import('~/components/content/surgery-report/list.vue'))
+const VaccineDataListAsync = defineAsyncComponent(() => import('~/components/content/vaccine-data/list.vue'))
const InitialNursingStudyAsync = defineAsyncComponent(() => import('~/components/content/initial-nursing/entry.vue'))
+const AssessmentEducationEntryAsync = defineAsyncComponent(
+ () => import('~/components/content/assessment-education/entry.vue'),
+)
const SummaryMedicAsync = defineAsyncComponent(() => import('~/components/content/summary-medic/entry.vue'))
const ActionReportEntryAsync = defineAsyncComponent(() => import('~/components/content/action-report/entry.vue'))
@@ -65,19 +68,17 @@ const defaultKeys: Record
= {
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
- // NOTE : HIDDEN UNTIL IT IS READY
- // earlyNurseryAssessment: {
- // id: 'early-nursery-assessment',
- // title: 'Pengkajian Awal Keperawatan',
- // classCode: ['ambulatory', 'emergency', 'inpatient'],
- // unit: 'all',
- // },
+ earlyNurseryAssessment: {
+ id: 'early-nursery-assessment',
+ title: 'Pengkajian Awal Keperawatan',
+ classCode: ['ambulatory', 'emergency', 'inpatient'],
+ unit: 'all',
+ },
earlyMedicalAssessment: {
id: 'early-medical-assessment',
title: 'Pengkajian Awal Medis',
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
- afterId: 'early-medical-assessment',
},
earlyMedicalRehabAssessment: {
id: 'rehab-medical-assessment',
@@ -86,27 +87,20 @@ const defaultKeys: Record = {
unit: 'rehab',
afterId: 'early-medical-assessment',
},
- fkr: {
- id: 'fkr',
- title: 'FKR',
- classCode: ['ambulatory', 'emergency', 'inpatient'],
- unit: 'all',
+ functionAssessment: {
+ id: 'function-assessment',
+ title: 'Asesmen Fungsi',
+ classCode: ['ambulatory'],
+ unit: 'rehab',
+ afterId: 'rehab-medical-assessment',
+ },
+ therapyProtocol: {
+ id: 'therapy-protocol',
+ classCode: ['ambulatory'],
+ title: 'Protokol Terapi',
+ unit: 'rehab',
+ afterId: 'function-assessment',
},
- // NOTE: Replaced by FRK
- // functionAssessment: {
- // id: 'function-assessment',
- // title: 'Asesmen Fungsi',
- // classCode: ['ambulatory'],
- // unit: 'rehab',
- // afterId: 'rehab-medical-assessment',
- // },
- // therapyProtocol: {
- // id: 'therapy-protocol',
- // classCode: ['ambulatory'],
- // title: 'Protokol Terapi',
- // unit: 'rehab',
- // afterId: 'function-assessment',
- // },
chemotherapyProtocol: {
id: 'chemotherapy-protocol',
title: 'Protokol Kemoterapi',
@@ -229,6 +223,12 @@ const defaultKeys: Record = {
classCode: ['ambulatory', 'emergency'],
unit: 'all',
},
+ kfr: {
+ id: 'kfr',
+ title: 'KFR',
+ classCode: ['ambulatory', 'emergency', 'inpatient'],
+ unit: 'all',
+ },
refBack: {
id: 'reference-back',
title: 'PRB',
@@ -265,12 +265,6 @@ const defaultKeys: Record = {
classCode: ['ambulatory', 'emergency', 'inpatient'],
unit: 'all',
},
- summaryMedic: {
- id: 'summary-medic',
- title: 'Profil Ringkasan Medis',
- classCode: ['ambulatory', 'emergency', 'inpatient'],
- unit: 'all',
- },
initialNursingStudy: {
id: 'initial-nursing-study',
title: 'Kajian Awal Keperawatan',
@@ -362,9 +356,12 @@ export function injectComponents(id: string | number, data: EncounterListData, m
}
}
if (currentKeys?.educationAssessment) {
- // TODO: add component for education assessment
- currentKeys.educationAssessment['component'] = null
- currentKeys.educationAssessment['props'] = { encounter_id: id }
+ currentKeys.educationAssessment['component'] = AssessmentEducationEntryAsync
+ currentKeys.educationAssessment['props'] = {
+ encounter: data?.encounter,
+ type: 'education-assessment',
+ label: currentKeys.educationAssessment['title'],
+ }
}
if (currentKeys?.generalConsent) {
currentKeys.generalConsent['component'] = GeneralConsentListAsync
@@ -424,9 +421,9 @@ export function injectComponents(id: string | number, data: EncounterListData, m
currentKeys.refBack['component'] = PrbListAsync
currentKeys.refBack['props'] = { encounter: data?.encounter }
}
- if (currentKeys?.fkr) {
- currentKeys.fkr['component'] = KfrListAsync
- currentKeys.fkr['props'] = { encounter: data?.encounter }
+ if (currentKeys?.kfr) {
+ currentKeys.kfr['component'] = KfrListAsync
+ currentKeys.kfr['props'] = { encounter: data?.encounter }
}
if (currentKeys?.screening) {
// TODO: add component for screening
@@ -450,10 +447,12 @@ export function injectComponents(id: string | number, data: EncounterListData, m
currentKeys.priceList['component'] = null
currentKeys.priceList['props'] = { encounter_id: id }
}
- if (currentKeys?.summaryMedic) {
- currentKeys.summaryMedic['component'] = SummaryMedicAsync
- currentKeys.summaryMedic['props'] = { encounter_id: id }
+
+ if (currentKeys?.initialNursingStudy) {
+ currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync
+ currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
}
+
if (currentKeys?.initialNursingStudy) {
currentKeys.initialNursingStudy['component'] = InitialNursingStudyAsync
currentKeys.initialNursingStudy['props'] = { encounter: data?.encounter }
@@ -527,12 +526,9 @@ export function mapResponseToEncounter(result: any): any {
? result.visitDate
: result.registeredAt || result.patient?.registeredAt || null,
adm_employee_id: result.adm_employee_id || 0,
- adm_employee: result.adm_employee || null,
- responsible_nurse_code: result.responsible_nurse_code || null,
- responsible_nurse: result.responsible_nurse || null,
- appointment_doctor_code: result.appointment_doctor_code || null,
+ appointment_doctor_id: result.appointment_doctor_id || null,
+ responsible_doctor_id: result.responsible_doctor_id || null,
appointment_doctor: result.appointment_doctor || null,
- responsible_doctor_code: result.responsible_doctor_id || null,
responsible_doctor: result.responsible_doctor || null,
refSource_name: result.refSource_name || null,
appointment_id: result.appointment_id || null,
diff --git a/app/lib/clinical.constants.ts b/app/lib/clinical.constants.ts
new file mode 100644
index 00000000..3b469499
--- /dev/null
+++ b/app/lib/clinical.constants.ts
@@ -0,0 +1,116 @@
+export const generalEduCode = {
+ 'right-obg': 'Hak dan kewajiban pasien dan keluarga',
+ 'general-consent': 'General Consent',
+ service: 'Pelayanan yang disediakan (jam pelayanan, akses pelayanan dan proses pelayanan)',
+ 'all-care-service': 'Sumber alternatif asuhan di tempat lain/faskes lain',
+ 'home-plan': 'Rencana tindakan di rumah',
+ 'home-care': 'Kebutuhan perawatan di rumah',
+ orientation: 'Orientasi Ruangan',
+ 'fall-risk-prevention': 'Pencegahan risiko jatuh',
+ 'alt-care': 'Alternatif pelayanan',
+ 'act-delay': 'Penundaan Tindakan',
+ others: 'Lain-lain',
+} as const
+
+export type GeneralEduCodeKey = keyof typeof generalEduCode
+
+export const specialEduCode = {
+ 'disease-diag-dev': 'Diagnosa penyakit dan perkembangannya',
+ 'safe-med-usage': 'Penggunaan obat yang aman',
+ 'side-effect': 'Efek samping dan reaksi obat',
+ diet: 'Diet/Nutrisi',
+ 'pain-mgmt': 'Manajemen nyeri',
+ 'medical-eq-usage': 'Penggunaan Peralatan Medis',
+ 'rehab-technique': 'Teknik Rehabilitasi',
+ 'prevention-act': 'Tindakan pencegahan (cuci tangan, pemasangan gelang)',
+} as const
+
+export type SpecialEduCodeKey = keyof typeof specialEduCode
+
+export const eduAssessmentCode = {
+ 'learn-ability': 'Kemampuan Belajar',
+ 'learn-will': 'Kemauan Belajar',
+ obstacle: 'Hambatan',
+ 'learn-method': 'Metode Pembelajaran',
+ lang: 'Bahasa',
+ 'lang-obstacle': 'Hambatan Bahasa',
+ belief: 'Keyakinan',
+} as const
+
+export type EduAssessmentCodeKey = keyof typeof eduAssessmentCode
+
+export const abilityCode = {
+ able: 'Mampu',
+ 'not-able': 'Tidak Mampu',
+} as const
+
+export type AbilityCodeKey = keyof typeof abilityCode
+
+export const willCode = {
+ ready: 'Siap',
+ interested: 'Tertarik',
+ 'not-interested': 'Tidak Tertarik',
+} as const
+
+export type WillCodeKey = keyof typeof willCode
+
+export const medObstacleCode = {
+ hearing: 'Pendengaran',
+ sight: 'Penglihatan',
+ physical: 'Fisik',
+ emotional: 'Emosional',
+ cognitif: 'Kognitif',
+} as const
+
+export type MedObstacleCodeKey = keyof typeof medObstacleCode
+
+export const learnMethodCode = {
+ demo: 'Demonstrasi',
+ 'discuss-leaflet': 'Diskusi Leaflet',
+} as const
+
+export type LearnMethodCodeKey = keyof typeof learnMethodCode
+
+export const langClassCode = {
+ ind: 'Indonesia',
+ region: 'Daerah',
+ foreign: 'Asing',
+} as const
+
+export type LangClassCodeKey = keyof typeof langClassCode
+
+export const translatorSrcCode = {
+ team: 'Tim Penerjemah',
+ family: 'Keluarga',
+} as const
+
+export type TranslatorSrcCodeKey = keyof typeof translatorSrcCode
+
+// helpers
+type EduCodeType = 'general' | 'special'
+export function serializeKeyToBoolean(type: EduCodeType, selected: string[]): Record {
+ switch (type) {
+ case 'general': {
+ return Object.keys(generalEduCode).reduce(
+ (acc, key) => {
+ acc[key] = selected.includes(key)
+ return acc
+ },
+ {} as Record,
+ )
+ }
+
+ case 'special': {
+ return Object.keys(specialEduCode).reduce(
+ (acc, key) => {
+ acc[key] = selected.includes(key)
+ return acc
+ },
+ {} as Record,
+ )
+ }
+
+ default:
+ throw new Error('unknown type to serialize')
+ }
+}
diff --git a/app/lib/utils.ts b/app/lib/utils.ts
index 180320ae..cc436459 100644
--- a/app/lib/utils.ts
+++ b/app/lib/utils.ts
@@ -9,6 +9,10 @@ export interface SelectOptionType<_T = string> {
label: string
code?: string
}
+export interface CheckItem {
+ id: string
+ label: string
+}
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
@@ -29,6 +33,15 @@ export function mapToComboboxOptList(items: Record): SelectOptio
return result
}
+export function mapToCheckItems, K extends keyof T & string>(
+ items: T,
+): { id: K; label: T[K] }[] {
+ return Object.entries(items).map(([key, value]) => ({
+ id: key as K,
+ label: value as T[K],
+ }))
+}
+
/**
* Mengkonversi string menjadi title case (huruf pertama setiap kata kapital)
* @param str - String yang akan dikonversi
@@ -38,7 +51,6 @@ export function toTitleCase(str: string): string {
return str.toLowerCase().replace(/\b\w/g, (char) => char.toUpperCase())
}
-
/**
* Menghitung umur berdasarkan tanggal lahir
* @param birthDate - Tanggal lahir dalam format Date atau string
diff --git a/app/models/encounter.ts b/app/models/encounter.ts
index 56ff2af7..95bccff0 100644
--- a/app/models/encounter.ts
+++ b/app/models/encounter.ts
@@ -52,7 +52,7 @@ export function genEncounter(): Encounter {
patient: genPatient(),
registeredAt: '',
class_code: '',
- unit_code: '',
+ unit_code: 0,
unit: genUnit(),
visitDate: '',
adm_employee_id: 0,
diff --git a/app/models/nurse.ts b/app/models/nurse.ts
index 5f511781..d5e1f95f 100644
--- a/app/models/nurse.ts
+++ b/app/models/nurse.ts
@@ -1,9 +1,7 @@
import { type Base, genBase } from "./_base"
-import type { Employee } from "./employee"
export interface Nurse extends Base {
employee_id: number
- employee?: Employee
ihs_number?: string
unit_id: number
infra_id: number
diff --git a/app/pages/(features)/rehab/encounter/[id]/education-assessment/add.vue b/app/pages/(features)/rehab/encounter/[id]/education-assessment/add.vue
new file mode 100644
index 00000000..98eee259
--- /dev/null
+++ b/app/pages/(features)/rehab/encounter/[id]/education-assessment/add.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
diff --git a/app/schemas/encounter.schema.ts b/app/schemas/encounter.schema.ts
index 872c1e97..e3c9affc 100644
--- a/app/schemas/encounter.schema.ts
+++ b/app/schemas/encounter.schema.ts
@@ -4,9 +4,8 @@ import { InternalReferenceSchema } from './internal-reference.schema'
// Check In
const CheckInSchema = z.object({
// registeredAt: z.string({ required_error: 'Tanggal masuk harus diisi' }),
- responsible_doctor_code: z.string({ required_error: 'Dokter harus diisi' }),
- // adm_employee_id: z.number({ required_error: 'PJA harus diisi' }).gt(0, 'PJA harus diisi'),
- registeredAt: z.string({ required_error: 'waktu harus diisi' }),
+ responsible_doctor_id: z.number({ required_error: 'Dokter harus diisi' }).gt(0, 'Dokter harus diisi'),
+ adm_employee_id: z.number({ required_error: 'PJA harus diisi' }).gt(0, 'PJA harus diisi'),
})
type CheckInFormData = z.infer
diff --git a/app/services/assessment-education.service.ts b/app/services/assessment-education.service.ts
new file mode 100644
index 00000000..251ea1f9
--- /dev/null
+++ b/app/services/assessment-education.service.ts
@@ -0,0 +1,28 @@
+// Base
+import * as base from './_crud-base'
+
+// Types
+import type { EduAssessmentRaw, EduAssessment } from '~/models/edu-assessment'
+
+const path = '/api/v1/edu-assessment'
+const name = 'edu-assessment'
+
+export function create(data: EduAssessmentRaw) {
+ return base.create(path, data, name)
+}
+
+export function getList(params: any = null) {
+ return base.getList(path, params, name)
+}
+
+export function getDetail(id: number | string) {
+ return base.getDetail(path, id, name)
+}
+
+export function update(id: number | string, data: any) {
+ return base.update(path, id, data, name)
+}
+
+export function remove(id: number | string) {
+ return base.remove(path, id, name)
+}