diff --git a/app/assets/svg/wavey-fingerprint.svg b/app/assets/svg/wavey-fingerprint.svg
new file mode 100644
index 00000000..b281297f
--- /dev/null
+++ b/app/assets/svg/wavey-fingerprint.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/app/components/app/general-consent/entry.vue b/app/components/app/general-consent/entry.vue
new file mode 100644
index 00000000..75e30cec
--- /dev/null
+++ b/app/components/app/general-consent/entry.vue
@@ -0,0 +1,214 @@
+
+
+
+
+
diff --git a/app/components/app/general-consent/list.cfg.ts b/app/components/app/general-consent/list.cfg.ts
new file mode 100644
index 00000000..c2f57c54
--- /dev/null
+++ b/app/components/app/general-consent/list.cfg.ts
@@ -0,0 +1,82 @@
+import type { Config, RecComponent, RecStrFuncComponent, RecStrFuncUnknown } from '~/components/pub/my-ui/data-table'
+import { defineAsyncComponent } from 'vue'
+import type { GeneralConsent } from '~/models/general-consent'
+
+type SmallDetailDto = any
+
+const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue'))
+export const config: Config = {
+ cols: [{ width: 100 }, {}, {}, {}, { width: 50 }],
+ headers: [
+ [
+ { label: 'Tanggal' },
+ { label: 'Anggota Keluarga' },
+ { label: 'Penanggung Jawab' },
+ { label: 'Pemberi Informasi' },
+ { label: 'Saksi 1' },
+ { label: 'Saksi 2' },
+ { label: '' },
+ ],
+ ],
+ keys: ['date', 'relatives', 'responsible', 'informant', 'witness1', 'witness2', 'action'],
+ delKeyNames: [
+ { key: 'data', label: 'Tanggal' },
+ { key: 'dstDoctor.name', label: 'Dokter' },
+ ],
+ parses: {
+ date(rec) {
+ const recX = rec as GeneralConsent
+ return recX?.createdAt?.substring(0, 10) || '-'
+ },
+ relatives(rec) {
+ const recX = rec as GeneralConsent
+ const parsed = JSON.parse(recX?.value || '{}')
+ return parsed?.relatives?.join(', ') || '-'
+ },
+ responsible(rec) {
+ const recX = rec as GeneralConsent
+ const parsed = JSON.parse(recX?.value || '{}')
+ return parsed?.responsible || '-'
+ },
+ informant(rec) {
+ const recX = rec as GeneralConsent
+ const parsed = JSON.parse(recX?.value || '{}')
+ return parsed?.informant || '-'
+ },
+ witness1(rec) {
+ const recX = rec as GeneralConsent
+ const parsed = JSON.parse(recX?.value || '{}')
+ return parsed?.witness1 || '-'
+ },
+ witness2(rec) {
+ const recX = rec as GeneralConsent
+ const parsed = JSON.parse(recX?.value || '{}')
+ return parsed?.witness2 || '-'
+ },
+ action(rec, idx) {
+ const res: RecComponent = {
+ idx,
+ rec: rec as object,
+ component: action,
+ props: {
+ size: 'sm',
+ },
+ }
+ return res
+ },
+ },
+ components: {
+ action(rec, idx) {
+ const res: RecComponent = {
+ idx,
+ rec: rec as object,
+ component: action,
+ props: {
+ size: 'sm',
+ },
+ }
+ return res
+ },
+ } as RecStrFuncComponent,
+ htmls: {} as RecStrFuncUnknown,
+}
diff --git a/app/components/app/general-consent/list.vue b/app/components/app/general-consent/list.vue
new file mode 100644
index 00000000..46f595f5
--- /dev/null
+++ b/app/components/app/general-consent/list.vue
@@ -0,0 +1,34 @@
+
+
+
+
+
diff --git a/app/components/app/medicine-form/entry-form.vue b/app/components/app/medicine-form/entry-form.vue
new file mode 100644
index 00000000..fb26631e
--- /dev/null
+++ b/app/components/app/medicine-form/entry-form.vue
@@ -0,0 +1,119 @@
+
+
+
+
+
diff --git a/app/components/app/medicine-form/list-cfg.ts b/app/components/app/medicine-form/list-cfg.ts
new file mode 100644
index 00000000..5b66812a
--- /dev/null
+++ b/app/components/app/medicine-form/list-cfg.ts
@@ -0,0 +1,38 @@
+import type { Config, RecComponent } from '~/components/pub/my-ui/data-table'
+import { defineAsyncComponent } from 'vue'
+
+const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue'))
+
+export const config: Config = {
+ cols: [{}, {}, { width: 50 }],
+
+ headers: [
+ [
+ { label: 'Kode' },
+ { label: 'Nama' },
+ { label: 'Aksi' },
+ ],
+ ],
+
+ keys: ['code', 'name', 'action'],
+
+ delKeyNames: [
+ { key: 'code', label: 'Kode' },
+ { key: 'name', label: 'Nama' },
+ ],
+
+ parses: {},
+
+ components: {
+ action(rec, idx) {
+ const res: RecComponent = {
+ idx,
+ rec: rec as object,
+ component: action,
+ }
+ return res
+ },
+ },
+
+ htmls: {},
+}
diff --git a/app/components/app/medicine-form/list.vue b/app/components/app/medicine-form/list.vue
new file mode 100644
index 00000000..e4544c2f
--- /dev/null
+++ b/app/components/app/medicine-form/list.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
diff --git a/app/components/app/medicine/entry-form.vue b/app/components/app/medicine/entry-form.vue
index 42989fcb..af4df34f 100644
--- a/app/components/app/medicine/entry-form.vue
+++ b/app/components/app/medicine/entry-form.vue
@@ -18,6 +18,7 @@ interface Props {
isReadonly?: boolean
medicineGroups?: { value: string; label: string }[]
medicineMethods?: { value: string; label: string }[]
+ medicineForms?: { value: string; label: string }[]
uoms?: { value: string; label: string }[]
}
@@ -36,6 +37,7 @@ const { defineField, errors, meta } = useForm({
name: '',
medicineGroup_code: '',
medicineMethod_code: '',
+ medicineForm_code: '',
uom_code: '',
stock: 0,
},
@@ -45,6 +47,7 @@ const [code, codeAttrs] = defineField('code')
const [name, nameAttrs] = defineField('name')
const [medicineGroup_code, medicineGroupAttrs] = defineField('medicineGroup_code')
const [medicineMethod_code, medicineMethodAttrs] = defineField('medicineMethod_code')
+const [medicineForm_code, medicineFormAttrs] = defineField('medicineForm_code')
const [uom_code, uomAttrs] = defineField('uom_code')
const [stock, stockAttrs] = defineField('stock')
@@ -53,6 +56,7 @@ if (props.values) {
if (props.values.name !== undefined) name.value = props.values.name
if (props.values.medicineGroup_code !== undefined) medicineGroup_code.value = props.values.medicineGroup_code
if (props.values.medicineMethod_code !== undefined) medicineMethod_code.value = props.values.medicineMethod_code
+ if (props.values.medicineForm_code !== undefined) medicineForm_code.value = props.values.medicineForm_code
if (props.values.uom_code !== undefined) uom_code.value = props.values.uom_code
if (props.values.stock !== undefined) stock.value = props.values.stock
}
@@ -62,6 +66,7 @@ const resetForm = () => {
name.value = ''
medicineGroup_code.value = ''
medicineMethod_code.value = ''
+ medicineForm_code.value = '',
uom_code.value = ''
stock.value = 0
}
@@ -72,6 +77,7 @@ function onSubmitForm() {
name: name.value || '',
medicineGroup_code: medicineGroup_code.value || '',
medicineMethod_code: medicineMethod_code.value || '',
+ medicineForm_code: medicineForm_code.value || '',
uom_code: uom_code.value || '',
stock: stock.value || 0,
}
@@ -138,6 +144,20 @@ function onCancelForm() {
/>
+ |
+
+
+
+
+ |
diff --git a/app/components/app/medicine/list-cfg.ts b/app/components/app/medicine/list-cfg.ts
index 059022c8..5d1740f8 100644
--- a/app/components/app/medicine/list-cfg.ts
+++ b/app/components/app/medicine/list-cfg.ts
@@ -15,12 +15,13 @@ export const config: Config = {
{ label: 'Golongan' },
{ label: 'Metode Pemberian' },
{ label: 'Satuan' },
+ { label: 'Sediaan' },
{ label: 'Stok' },
{ label: 'Aksi' },
],
],
- keys: ['code', 'name', 'group', 'method', 'unit', 'stock', 'action'],
+ keys: ['code', 'name', 'group', 'method', 'unit', 'form', 'stock', 'action'],
delKeyNames: [
{ key: 'code', label: 'Kode' },
@@ -37,6 +38,9 @@ export const config: Config = {
unit: (rec: unknown): unknown => {
return (rec as SmallDetailDto).uom?.name || '-'
},
+ form: (rec: unknown): unknown => {
+ return (rec as SmallDetailDto).medicineForm?.name || '-'
+ },
},
components: {
diff --git a/app/components/app/resume/_common/print-btn.vue b/app/components/app/resume/_common/print-btn.vue
new file mode 100644
index 00000000..5688d007
--- /dev/null
+++ b/app/components/app/resume/_common/print-btn.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/app/resume/_common/select-arrangement.vue b/app/components/app/resume/_common/select-arrangement.vue
new file mode 100644
index 00000000..7e236ff0
--- /dev/null
+++ b/app/components/app/resume/_common/select-arrangement.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-concious-level.vue b/app/components/app/resume/_common/select-concious-level.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-concious-level.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-date.vue b/app/components/app/resume/_common/select-date.vue
new file mode 100644
index 00000000..74245e7e
--- /dev/null
+++ b/app/components/app/resume/_common/select-date.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+ {
+ const dateStr = typeof value === 'number' ? String(value) : value
+ patientAge = calculateAge(dateStr)
+ }
+ "
+ />
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-death-cause.vue b/app/components/app/resume/_common/select-death-cause.vue
new file mode 100644
index 00000000..a155b139
--- /dev/null
+++ b/app/components/app/resume/_common/select-death-cause.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-faskes.vue b/app/components/app/resume/_common/select-faskes.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-faskes.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-following-arrangement.vue b/app/components/app/resume/_common/select-following-arrangement.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-following-arrangement.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-hospital-leave-condition.vue b/app/components/app/resume/_common/select-hospital-leave-condition.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-hospital-leave-condition.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-hospital-leave-method.vue b/app/components/app/resume/_common/select-hospital-leave-method.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-hospital-leave-method.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-icd-10.vue b/app/components/app/resume/_common/select-icd-10.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-icd-10.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-icd-9.vue b/app/components/app/resume/_common/select-icd-9.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-icd-9.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-national-program-service-status.vue b/app/components/app/resume/_common/select-national-program-service-status.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-national-program-service-status.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-national-program-service.vue b/app/components/app/resume/_common/select-national-program-service.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-national-program-service.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-pain-scale.vue b/app/components/app/resume/_common/select-pain-scale.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-pain-scale.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-primary-diagnosis.vue b/app/components/app/resume/_common/select-primary-diagnosis.vue
new file mode 100644
index 00000000..0852195b
--- /dev/null
+++ b/app/components/app/resume/_common/select-primary-diagnosis.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/select-secondary-diagnosis.vue b/app/components/app/resume/_common/select-secondary-diagnosis.vue
new file mode 100644
index 00000000..a155b139
--- /dev/null
+++ b/app/components/app/resume/_common/select-secondary-diagnosis.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/resume/_common/verify-badge.vue b/app/components/app/resume/_common/verify-badge.vue
new file mode 100644
index 00000000..8a999895
--- /dev/null
+++ b/app/components/app/resume/_common/verify-badge.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+ {{ statusText }}
+
+
+
\ No newline at end of file
diff --git a/app/components/app/resume/add.vue b/app/components/app/resume/add.vue
new file mode 100644
index 00000000..d5fa3370
--- /dev/null
+++ b/app/components/app/resume/add.vue
@@ -0,0 +1,482 @@
+
+
+
+
+
diff --git a/app/components/app/resume/history-list/action-history-dialog.vue b/app/components/app/resume/history-list/action-history-dialog.vue
new file mode 100644
index 00000000..5602016e
--- /dev/null
+++ b/app/components/app/resume/history-list/action-history-dialog.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/app/resume/history-list/action-list.cfg.ts b/app/components/app/resume/history-list/action-list.cfg.ts
new file mode 100644
index 00000000..2dad3e6a
--- /dev/null
+++ b/app/components/app/resume/history-list/action-list.cfg.ts
@@ -0,0 +1,94 @@
+import type { Config } from '~/components/pub/my-ui/data-table'
+import type { Patient } from '~/models/patient'
+import { defineAsyncComponent } from 'vue'
+import { educationCodes, genderCodes } from '~/lib/constants'
+import { calculateAge } from '~/lib/utils'
+
+const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dvvp.vue'))
+
+export const config: Config = {
+ cols: [{width: 140}, {}, {}, {width: 140}, {width: 10},],
+
+ headers: [
+ [
+ { label: 'Tanggal/Jam' },
+ { label: 'Dokter' },
+ { label: 'Tempat Layanan' },
+ { label: 'Jenis' },
+ { label: 'Jenis Pemeriksaan' },
+ { label: 'Tanggal/Jam' },
+ ],
+ ],
+
+ keys: ['birth_date', 'person.name', 'person.name', 'person.name', 'person.name', 'birth_date',],
+
+ delKeyNames: [
+ { key: 'code', label: 'Kode' },
+ { key: 'name', label: 'Nama' },
+ ],
+
+ parses: {
+ patientId: (rec: unknown): unknown => {
+ const patient = rec as Patient
+ return patient.number
+ },
+ identity_number: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (person.nationality == 'WNA') {
+ return person.passportNumber
+ }
+
+ return person.residentIdentityNumber || '-'
+ },
+ birth_date: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (typeof person.birthDate == 'object' && person.birthDate) {
+ return (person.birthDate as Date).toLocaleDateString('id-ID')
+ } else if (typeof person.birthDate == 'string') {
+ return (person.birthDate as string).substring(0, 10)
+ }
+ return person.birthDate
+ },
+ patient_age: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+ return calculateAge(person.birthDate)
+ },
+ gender: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (typeof person.gender_code == 'number' && person.gender_code >= 0) {
+ return person.gender_code
+ } else if (typeof person.gender_code === 'string' && person.gender_code) {
+ return genderCodes[person.gender_code] || '-'
+ }
+ return '-'
+ },
+ education: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+ if (typeof person.education_code == 'number' && person.education_code >= 0) {
+ return person.education_code
+ } else if (typeof person.education_code === 'string' && person.education_code) {
+ return educationCodes[person.education_code] || '-'
+ }
+ return '-'
+ },
+ },
+
+ components: {
+ action(rec, idx) {
+ return {
+ idx,
+ rec: rec as object,
+ component: action,
+ }
+ },
+ },
+
+ htmls: {
+ patient_address(_rec) {
+ return '-'
+ },
+ },
+}
diff --git a/app/components/app/resume/history-list/consultation-history-dialog.vue b/app/components/app/resume/history-list/consultation-history-dialog.vue
new file mode 100644
index 00000000..ad1e777e
--- /dev/null
+++ b/app/components/app/resume/history-list/consultation-history-dialog.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/app/resume/history-list/consultation-list.cfg.ts b/app/components/app/resume/history-list/consultation-list.cfg.ts
new file mode 100644
index 00000000..196c208c
--- /dev/null
+++ b/app/components/app/resume/history-list/consultation-list.cfg.ts
@@ -0,0 +1,51 @@
+import type { Config } from '~/components/pub/my-ui/data-table'
+import type { Patient } from '~/models/patient'
+import { defineAsyncComponent } from 'vue'
+
+const lampiranBtn = defineAsyncComponent(() => import('../_common/print-btn.vue'))
+
+export const config: Config = {
+ cols: [{}, {}, {}, {}, {},],
+
+ headers: [
+ [
+ { label: 'Tanggal/Jam' },
+ { label: 'Dokter' },
+ { label: 'Tempat Layanan' },
+ { label: 'KSM' },
+ { label: 'Tanggal/Jam' },
+ { label: 'Tujuan' },
+ { label: 'Dokter' },
+ { label: 'Berkas' },
+ ],
+ ],
+
+ keys: ['birth_date', 'person.name', 'person.name', 'person.name', 'person.name', 'birth_date','person.name', 'action', ],
+
+ parses: {
+ birth_date: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (typeof person.birthDate == 'object' && person.birthDate) {
+ return (person.birthDate as Date).toLocaleDateString('id-ID')
+ } else if (typeof person.birthDate == 'string') {
+ return (person.birthDate as string).substring(0, 10)
+ }
+ return person.birthDate
+ },
+ },
+
+ components: {
+ action(rec, idx) {
+ return {
+ idx,
+ rec: rec as object,
+ component: lampiranBtn,
+ }
+ },
+ },
+
+ htmls: {
+
+ },
+}
diff --git a/app/components/app/resume/history-list/farmacy-history-dialog.vue b/app/components/app/resume/history-list/farmacy-history-dialog.vue
new file mode 100644
index 00000000..53bf3875
--- /dev/null
+++ b/app/components/app/resume/history-list/farmacy-history-dialog.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/app/resume/history-list/farmacy-list.cfg.ts b/app/components/app/resume/history-list/farmacy-list.cfg.ts
new file mode 100644
index 00000000..75ea1e80
--- /dev/null
+++ b/app/components/app/resume/history-list/farmacy-list.cfg.ts
@@ -0,0 +1,39 @@
+import type { Config } from '~/components/pub/my-ui/data-table'
+import type { Patient } from '~/models/patient'
+
+export const config: Config = {
+ cols: [{}, {}, {}, {}, {},],
+
+ headers: [
+ [
+ { label: 'Tanggal Order' },
+ { label: 'No Resep' },
+ { label: 'Tempat Layanan' },
+ { label: 'Nama Obat' },
+ { label: 'Tanggal Disetujui' },
+ ],
+ ],
+
+ keys: ['birth_date', 'person.name', 'person.name', 'person.name', 'birth_date',],
+
+ parses: {
+ birth_date: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (typeof person.birthDate == 'object' && person.birthDate) {
+ return (person.birthDate as Date).toLocaleDateString('id-ID')
+ } else if (typeof person.birthDate == 'string') {
+ return (person.birthDate as string).substring(0, 10)
+ }
+ return person.birthDate
+ },
+ },
+
+ components: {
+
+ },
+
+ htmls: {
+
+ },
+}
diff --git a/app/components/app/resume/history-list/national-program-history-dialog.vue b/app/components/app/resume/history-list/national-program-history-dialog.vue
new file mode 100644
index 00000000..cc702227
--- /dev/null
+++ b/app/components/app/resume/history-list/national-program-history-dialog.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/app/resume/history-list/national-program-list.cfg.ts b/app/components/app/resume/history-list/national-program-list.cfg.ts
new file mode 100644
index 00000000..fe6d3ea0
--- /dev/null
+++ b/app/components/app/resume/history-list/national-program-list.cfg.ts
@@ -0,0 +1,30 @@
+import type { Config } from '~/components/pub/my-ui/data-table'
+import type { Patient } from '~/models/patient'
+
+export const config: Config = {
+ cols: [{}, {}, {}, {}, {},],
+
+ headers: [
+ [
+ { label: 'Nomor' },
+ { label: 'Layanan Program Nasional' },
+ { label: 'Status' },
+ ],
+ ],
+
+ keys: ['person.name', 'person.name', 'person.name',],
+
+ parses: {
+ // birth_date: (rec: unknown): unknown => {
+
+ // },
+ },
+
+ components: {
+
+ },
+
+ htmls: {
+
+ },
+}
diff --git a/app/components/app/resume/history-list/supporting-history-dialog.vue b/app/components/app/resume/history-list/supporting-history-dialog.vue
new file mode 100644
index 00000000..32fb4508
--- /dev/null
+++ b/app/components/app/resume/history-list/supporting-history-dialog.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/app/resume/history-list/supporting-list.cfg.ts b/app/components/app/resume/history-list/supporting-list.cfg.ts
new file mode 100644
index 00000000..f005042d
--- /dev/null
+++ b/app/components/app/resume/history-list/supporting-list.cfg.ts
@@ -0,0 +1,39 @@
+import type { Config } from '~/components/pub/my-ui/data-table'
+import type { Patient } from '~/models/patient'
+
+export const config: Config = {
+ cols: [{}, {}, {}, {}, {},],
+
+ headers: [
+ [
+ { label: 'Tanggal Order' },
+ { label: 'No Lab' },
+ { label: 'Nama Pemeriksaan' },
+ { label: 'Tanggal Pemeriksaan' },
+ ],
+ ],
+
+ keys: ['birth_date', 'person.name', 'person.name', 'birth_date',],
+
+ parses: {
+ birth_date: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (typeof person.birthDate == 'object' && person.birthDate) {
+ return (person.birthDate as Date).toLocaleDateString('id-ID')
+ } else if (typeof person.birthDate == 'string') {
+ return (person.birthDate as string).substring(0, 10)
+ }
+ return person.birthDate
+ },
+ },
+
+ components: {
+ },
+
+ htmls: {
+ // patient_address(_rec) {
+ // return '-'
+ // },
+ },
+}
diff --git a/app/components/app/resume/list.cfg.ts b/app/components/app/resume/list.cfg.ts
new file mode 100644
index 00000000..b756b1ee
--- /dev/null
+++ b/app/components/app/resume/list.cfg.ts
@@ -0,0 +1,101 @@
+import type { Config } from '~/components/pub/my-ui/data-table'
+import type { Patient } from '~/models/patient'
+import { defineAsyncComponent } from 'vue'
+import { educationCodes, genderCodes } from '~/lib/constants'
+import { calculateAge } from '~/lib/utils'
+
+const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dvvp.vue'))
+const statusBadge = defineAsyncComponent(() => import('./_common/verify-badge.vue'))
+
+export const config: Config = {
+ cols: [{width: 140}, {}, {}, {width: 140}, {width: 10},],
+
+ headers: [
+ [
+ { label: 'Tgl Simpan' },
+ { label: 'DPJP' },
+ { label: 'KSM' },
+ { label: 'Status' },
+ { label: 'Action' },
+ ],
+ ],
+
+ keys: ['birth_date', 'number', 'person.name', 'status', 'action'],
+
+ delKeyNames: [
+ { key: 'code', label: 'Kode' },
+ { key: 'name', label: 'Nama' },
+ ],
+
+ parses: {
+ patientId: (rec: unknown): unknown => {
+ const patient = rec as Patient
+ return patient.number
+ },
+ identity_number: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (person.nationality == 'WNA') {
+ return person.passportNumber
+ }
+
+ return person.residentIdentityNumber || '-'
+ },
+ birth_date: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (typeof person.birthDate == 'object' && person.birthDate) {
+ return (person.birthDate as Date).toLocaleDateString('id-ID')
+ } else if (typeof person.birthDate == 'string') {
+ return (person.birthDate as string).substring(0, 10)
+ }
+ return person.birthDate
+ },
+ patient_age: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+ return calculateAge(person.birthDate)
+ },
+ gender: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+
+ if (typeof person.gender_code == 'number' && person.gender_code >= 0) {
+ return person.gender_code
+ } else if (typeof person.gender_code === 'string' && person.gender_code) {
+ return genderCodes[person.gender_code] || '-'
+ }
+ return '-'
+ },
+ education: (rec: unknown): unknown => {
+ const { person } = rec as Patient
+ if (typeof person.education_code == 'number' && person.education_code >= 0) {
+ return person.education_code
+ } else if (typeof person.education_code === 'string' && person.education_code) {
+ return educationCodes[person.education_code] || '-'
+ }
+ return '-'
+ },
+ },
+
+ components: {
+ action(rec, idx) {
+ return {
+ idx,
+ rec: rec as object,
+ component: action,
+ }
+ },
+ status(rec, idx) {
+ return {
+ idx,
+ rec: rec as object,
+ component: statusBadge,
+ }
+ },
+ },
+
+ htmls: {
+ patient_address(_rec) {
+ return '-'
+ },
+ },
+}
diff --git a/app/components/app/resume/list.vue b/app/components/app/resume/list.vue
new file mode 100644
index 00000000..0d62cc6c
--- /dev/null
+++ b/app/components/app/resume/list.vue
@@ -0,0 +1,31 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/app/resume/verify-dialog.vue b/app/components/app/resume/verify-dialog.vue
new file mode 100644
index 00000000..ca4fb554
--- /dev/null
+++ b/app/components/app/resume/verify-dialog.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/components/content/document-upload/add.vue b/app/components/content/document-upload/add.vue
index 23fd30e0..9d099189 100644
--- a/app/components/content/document-upload/add.vue
+++ b/app/components/content/document-upload/add.vue
@@ -7,6 +7,7 @@ import { toast } from '~/components/pub/ui/toast'
import Confirmation from '~/components/pub/my-ui/confirmation/confirmation.vue'
import { DocumentUploadSchema } from '~/schemas/document-upload.schema'
import { toFormData } from '~/lib/utils'
+import { uploadAttachment } from '~/services/supporting-document.service'
// #region Props & Emits
const props = defineProps<{
diff --git a/app/components/content/document-upload/list.vue b/app/components/content/document-upload/list.vue
index 4fc55bc4..d1f6fbad 100644
--- a/app/components/content/document-upload/list.vue
+++ b/app/components/content/document-upload/list.vue
@@ -20,18 +20,21 @@ const roleAccess: PagePermission = PAGE_PERMISSIONS['/rehab/encounter']
const { getPagePermissions } = useRBAC()
const pagePermission = getPagePermissions(roleAccess)
+const {user,userRole} = useUserStore()
+const {getUserPermissions} = useRBAC()
+// #endregion
+
// #region State
const props = defineProps<{
encounter?: Encounter
+ refresh: () => void
}>()
-const {user,userRole} = useUserStore()
-const {getUserPermissions} = useRBAC()
const route = useRoute()
const encounterId = typeof route.params.id == 'string' ? parseInt(route.params.id) : 0
const { data, paginationMeta, handlePageChange, handleSearch, searchInput, fetchData } = usePaginatedList({
- fetchFn: (params) => getList({
+ fetchFn: (params) => getList({
'encounter-id': encounterId,
// includes: "employee",
...params,
@@ -57,7 +60,7 @@ if (pagePermission.canCreate) {
name: 'rehab-encounter-id-document-upload-add',
params: { id: encounterId },
}),
- }
+ }
}
const refSearchNav: RefSearchNav = {
@@ -119,7 +122,7 @@ watch([recId, recAction, timestamp], () => {
isDocPreviewDialogOpen.value = true
break
case ActionEvents.showEdit:
- if(pagePermission.canUpdate){
+ if(pagePermission.canUpdate){
navigateTo({
name: 'rehab-encounter-id-document-upload-document_id-edit',
params: { id: encounterId, "document_id": recId.value },
@@ -134,6 +137,16 @@ watch([recId, recAction, timestamp], () => {
} else {
unauthorizedToast()
}
+ navigateTo(recItem.value.filePath, { external: true, open: { target: '_blank' } })
+ break
+ case ActionEvents.showEdit:
+ navigateTo({
+ name: 'rehab-encounter-id-document-upload-document_id-edit',
+ params: { id: encounterId, "document_id": recId.value },
+ })
+ break
+ case ActionEvents.showConfirmDelete:
+ isRecordConfirmationOpen.value = true
break
}
})
@@ -162,7 +175,7 @@ watch([recId, recAction, timestamp], () => {
|
-
+