diff --git a/app/components/app/satusehat/list-cfg.ts b/app/components/app/satusehat/list-cfg.ts
index d287a38b..efc3d483 100644
--- a/app/components/app/satusehat/list-cfg.ts
+++ b/app/components/app/satusehat/list-cfg.ts
@@ -1,4 +1,4 @@
-import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '../../pub/nav/types'
+import type { Config } from '~/components/pub/my-ui/data-table'
import { defineAsyncComponent } from 'vue'
type SmallDetailDto = any
@@ -18,61 +18,61 @@ export const rowStatus = {
const patientBadge = defineAsyncComponent(() => import('./badge-patient.vue'))
const statusBadge = defineAsyncComponent(() => import('./badge-status.vue'))
-export const cols: Col[] = [
- { width: 100 },
- { width: 100 },
- { width: 100 },
- { width: 100 },
- { width: 100 },
- { width: 100 },
-]
-
-export const header: Th[][] = [
- [
- { label: 'ID' },
- { label: 'Jenis' },
- { label: 'Pasien' },
- { label: 'Status' },
- { label: 'Terakhir Update' },
- { label: 'FHIR ID' },
+export const config: Config = {
+ cols: [
+ { width: 100 },
+ { width: 100 },
+ { width: 100 },
+ { width: 100 },
+ { width: 100 },
+ { width: 100 },
],
-]
-export const keys = ['id', 'resource_type', 'patient', 'status', 'updated_at', 'fhir_id']
+ headers: [
+ [
+ { label: 'ID' },
+ { label: 'Jenis' },
+ { label: 'Pasien' },
+ { label: 'Status' },
+ { label: 'Terakhir Update' },
+ { label: 'FHIR ID' },
+ ],
+ ],
-export const delKeyNames: KeyLabel[] = [
- { key: 'code', label: 'Kode' },
- { key: 'name', label: 'Nama' },
-]
+ keys: ['id', 'resource_type', 'patient', 'status', 'updated_at', 'fhir_id'],
-export const funcParsed: RecStrFuncUnknown = {
- name: (rec: unknown): unknown => {
- const recX = rec as SmallDetailDto
- return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}`
- },
-}
-
-export const funcComponent: RecStrFuncComponent = {
- patient(rec, idx) {
- const res: RecComponent = {
- idx,
- rec: rec as object,
- component: patientBadge,
- }
- return res
- },
- status(rec, idx) {
- const res: RecComponent = {
- idx,
- rec: rec as object,
- component: statusBadge,
- }
- return res
- },
-}
-
-export const funcHtml: RecStrFuncUnknown = {
- patient_address(_rec) {
- return '-'
+ delKeyNames: [
+ { key: 'code', label: 'Kode' },
+ { key: 'name', label: 'Nama' },
+ ],
+
+ parses: {
+ name: (rec: unknown): unknown => {
+ const recX = rec as SmallDetailDto
+ return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}`
+ },
+ },
+
+ components: {
+ patient(rec, idx) {
+ return {
+ idx,
+ rec: rec as object,
+ component: patientBadge,
+ }
+ },
+ status(rec, idx) {
+ return {
+ idx,
+ rec: rec as object,
+ component: statusBadge,
+ }
+ },
+ },
+
+ htmls: {
+ patient_address(_rec) {
+ return '-'
+ },
},
}
diff --git a/app/components/app/satusehat/list.vue b/app/components/app/satusehat/list.vue
index 3e3fe4cb..58b4f1bd 100644
--- a/app/components/app/satusehat/list.vue
+++ b/app/components/app/satusehat/list.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/app/components/app/sep/entry-form.vue b/app/components/app/sep/entry-form.vue
index 9aea7c31..e48d23ec 100644
--- a/app/components/app/sep/entry-form.vue
+++ b/app/components/app/sep/entry-form.vue
@@ -10,7 +10,7 @@ import { Label } from '~/components/pub/ui/label'
import Select from '~/components/pub/ui/select/Select.vue'
import { RadioGroup, RadioGroupItem } from '~/components/pub/ui/radio-group'
import { Textarea } from '~/components/pub/ui/textarea'
-import DatepickerSingle from '~/components/pub/my-ui/form/datepicker-single.vue'
+import DatepickerSingle from '~/components/pub/my-ui/datepicker/datepicker-single.vue'
const emit = defineEmits<{
(e: 'event', value: any): void
diff --git a/app/components/app/sep/list-cfg.ts b/app/components/app/sep/list-cfg.ts
index 55fa91e1..4a6784fc 100644
--- a/app/components/app/sep/list-cfg.ts
+++ b/app/components/app/sep/list-cfg.ts
@@ -1,78 +1,77 @@
-import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, Th } from '~/components/pub/my-ui/data/types'
+import type { Config } from '~/components/pub/my-ui/data-table'
import { defineAsyncComponent } from 'vue'
type SepDto = any
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
-export const cols: Col[] = [
- { width: 120 }, // TGL. SEP
- { width: 150 }, // NO. SEP
- { width: 120 }, // PELAYANAN
- { width: 100 }, // JALUR
- { width: 150 }, // NO. RM
- { width: 200 }, // NAMA PASIEN
- { width: 150 }, // NO. KARTU BPJS
- { width: 150 }, // NO. SURAT KONTROL
- { width: 150 }, // TGL SURAT KONTROL
- { width: 150 }, // KLINIK TUJUAN
- { width: 200 }, // DPJP
- { width: 200 }, // DIAGNOSIS AWAL
- { width: 100 }, // AKSI
-]
-
-export const header: Th[][] = [
- [
- { label: 'TGL. SEP' },
- { label: 'NO. SEP' },
- { label: 'PELAYANAN' },
- { label: 'JALUR' },
- { label: 'NO. RM' },
- { label: 'NAMA PASIEN' },
- { label: 'NO. KARTU BPJS' },
- { label: 'NO. SURAT KONTROL' },
- { label: 'TGL SURAT KONTROL' },
- { label: 'KLINIK TUJUAN' },
- { label: 'DPJP' },
- { label: 'DIAGNOSIS AWAL' },
- { label: 'AKSI' },
+export const config: Config = {
+ cols: [
+ { width: 120 }, // TGL. SEP
+ { width: 150 }, // NO. SEP
+ { width: 120 }, // PELAYANAN
+ { width: 100 }, // JALUR
+ { width: 150 }, // NO. RM
+ { width: 200 }, // NAMA PASIEN
+ { width: 150 }, // NO. KARTU BPJS
+ { width: 150 }, // NO. SURAT KONTROL
+ { width: 150 }, // TGL SURAT KONTROL
+ { width: 150 }, // KLINIK TUJUAN
+ { width: 200 }, // DPJP
+ { width: 200 }, // DIAGNOSIS AWAL
+ { width: 100 }, // AKSI
],
-]
-export const keys = [
- 'tgl_sep',
- 'no_sep',
- 'pelayanan',
- 'jalur',
- 'no_rm',
- 'nama_pasien',
- 'no_kartu_bpjs',
- 'no_surat_kontrol',
- 'tgl_surat_kontrol',
- 'klinik_tujuan',
- 'dpjp',
- 'diagnosis_awal',
- 'action',
-]
+ headers: [
+ [
+ { label: 'TGL. SEP' },
+ { label: 'NO. SEP' },
+ { label: 'PELAYANAN' },
+ { label: 'JALUR' },
+ { label: 'NO. RM' },
+ { label: 'NAMA PASIEN' },
+ { label: 'NO. KARTU BPJS' },
+ { label: 'NO. SURAT KONTROL' },
+ { label: 'TGL SURAT KONTROL' },
+ { label: 'KLINIK TUJUAN' },
+ { label: 'DPJP' },
+ { label: 'DIAGNOSIS AWAL' },
+ { label: 'AKSI' },
+ ],
+ ],
-export const delKeyNames: KeyLabel[] = [
- { key: 'no_sep', label: 'NO. SEP' },
- { key: 'nama_pasien', label: 'Nama Pasien' },
-]
+ keys: [
+ 'tgl_sep',
+ 'no_sep',
+ 'pelayanan',
+ 'jalur',
+ 'no_rm',
+ 'nama_pasien',
+ 'no_kartu_bpjs',
+ 'no_surat_kontrol',
+ 'tgl_surat_kontrol',
+ 'klinik_tujuan',
+ 'dpjp',
+ 'diagnosis_awal',
+ 'action',
+ ],
-export const funcParsed: Record
any> = {
+ delKeyNames: [
+ { key: 'no_sep', label: 'NO. SEP' },
+ { key: 'nama_pasien', label: 'Nama Pasien' },
+ ],
-}
+ parses: {},
-export const funcComponent: RecStrFuncComponent = {
- action(rec, idx) {
- const res: RecComponent = {
- idx,
- rec: rec as object,
- component: action,
- }
- return res
+ components: {
+ action(rec, idx) {
+ return {
+ idx,
+ rec: rec as object,
+ component: action,
+ }
+ },
},
-}
-export const funcHtml: Record any> = {}
+ htmls: {},
+}
diff --git a/app/components/app/sep/list.vue b/app/components/app/sep/list.vue
index abf68e25..f44166e2 100644
--- a/app/components/app/sep/list.vue
+++ b/app/components/app/sep/list.vue
@@ -1,5 +1,5 @@
-
-
-
-
-
-
-
- |
+
+
diff --git a/app/components/app/soapi/function-entry.vue b/app/components/app/soapi/function-entry.vue
index a2fad36a..98d35663 100644
--- a/app/components/app/soapi/function-entry.vue
+++ b/app/components/app/soapi/function-entry.vue
@@ -1,172 +1,486 @@
diff --git a/app/components/app/soapi/list-cfg.ts b/app/components/app/soapi/list-cfg.ts
index 460cacd9..6fa11bda 100644
--- a/app/components/app/soapi/list-cfg.ts
+++ b/app/components/app/soapi/list-cfg.ts
@@ -1,119 +1,113 @@
-import type {
- Col,
- KeyLabel,
- RecComponent,
- RecStrFuncComponent,
- RecStrFuncUnknown,
- Th,
-} from '~/components/pub/my-ui/data/types'
+import type { Config } from '~/components/pub/my-ui/data-table'
import { defineAsyncComponent } from 'vue'
type SmallDetailDto = any
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
-export const cols: Col[] = [
- {},
- {},
- {},
- { width: 100 },
- { width: 120 },
- {},
- {},
- {},
- { width: 100 },
- { width: 100 },
- {},
- { width: 50 },
-]
-
-export const header: Th[][] = [
- [
- { label: 'Nama' },
- { label: 'Rekam Medis' },
- { label: 'KTP' },
- { label: 'Tgl Lahir' },
- { label: 'Umur' },
- { label: 'JK' },
- { label: 'Pendidikan' },
- { label: 'Status' },
- { label: '' },
+export const config: Config = {
+ cols: [
+ {},
+ {},
+ {},
+ { width: 100 },
+ { width: 120 },
+ {},
+ {},
+ {},
+ { width: 100 },
+ { width: 100 },
+ {},
+ { width: 50 },
],
-]
-export const keys = [
- 'name',
- 'medicalRecord_number',
- 'identity_number',
- 'birth_date',
- 'patient_age',
- 'gender',
- 'education',
- 'status',
- 'action',
-]
+ headers: [
+ [
+ { label: 'Nama' },
+ { label: 'Rekam Medis' },
+ { label: 'KTP' },
+ { label: 'Tgl Lahir' },
+ { label: 'Umur' },
+ { label: 'JK' },
+ { label: 'Pendidikan' },
+ { label: 'Status' },
+ { label: '' },
+ ],
+ ],
-export const delKeyNames: KeyLabel[] = [
- { key: 'code', label: 'Kode' },
- { key: 'name', label: 'Nama' },
-]
+ keys: [
+ 'name',
+ 'medicalRecord_number',
+ 'identity_number',
+ 'birth_date',
+ 'patient_age',
+ 'gender',
+ 'education',
+ 'status',
+ 'action',
+ ],
-export const funcParsed: RecStrFuncUnknown = {
- name: (rec: unknown): unknown => {
- const recX = rec as SmallDetailDto
- return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}`
+ delKeyNames: [
+ { key: 'code', label: 'Kode' },
+ { key: 'name', label: 'Nama' },
+ ],
+
+ parses: {
+ name: (rec: unknown): unknown => {
+ const recX = rec as SmallDetailDto
+ return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}`
+ },
+ identity_number: (rec: unknown): unknown => {
+ const recX = rec as SmallDetailDto
+ if (recX.identity_number?.substring(0, 5) === 'BLANK') {
+ return '(TANPA NIK)'
+ }
+ return recX.identity_number
+ },
+ birth_date: (rec: unknown): unknown => {
+ const recX = rec as SmallDetailDto
+ if (typeof recX.birth_date === 'object' && recX.birth_date) {
+ return (recX.birth_date as Date).toLocaleDateString()
+ } else if (typeof recX.birth_date === 'string') {
+ return recX.birth_date.substring(0, 10)
+ }
+ return recX.birth_date
+ },
+ patient_age: (rec: unknown): unknown => {
+ const recX = rec as SmallDetailDto
+ return recX.birth_date?.split('T')[0]
+ },
+ gender: (rec: unknown): unknown => {
+ const recX = rec as SmallDetailDto
+ if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') {
+ return 'Tidak Diketahui'
+ }
+ return recX.gender_code
+ },
+ education: (rec: unknown): unknown => {
+ const recX = rec as SmallDetailDto
+ if (typeof recX.education_code === 'number' && recX.education_code >= 0) {
+ return recX.education_code
+ } else if (typeof recX.education_code !== 'undefined') {
+ return recX.education_code
+ }
+ return '-'
+ },
},
- identity_number: (rec: unknown): unknown => {
- const recX = rec as SmallDetailDto
- if (recX.identity_number?.substring(0, 5) === 'BLANK') {
- return '(TANPA NIK)'
- }
- return recX.identity_number
+
+ components: {
+ action(rec, idx) {
+ return {
+ idx,
+ rec: rec as object,
+ component: action,
+ }
+ },
},
- birth_date: (rec: unknown): unknown => {
- const recX = rec as SmallDetailDto
- if (typeof recX.birth_date == 'object' && recX.birth_date) {
- return (recX.birth_date as Date).toLocaleDateString()
- } else if (typeof recX.birth_date == 'string') {
- return (recX.birth_date as string).substring(0, 10)
- }
- return recX.birth_date
- },
- patient_age: (rec: unknown): unknown => {
- const recX = rec as SmallDetailDto
- return recX.birth_date?.split('T')[0]
- },
- gender: (rec: unknown): unknown => {
- const recX = rec as SmallDetailDto
- if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') {
- return 'Tidak Diketahui'
- }
- return recX.gender_code
- },
- education: (rec: unknown): unknown => {
- const recX = rec as SmallDetailDto
- if (typeof recX.education_code == 'number' && recX.education_code >= 0) {
- return recX.education_code
- } else if (typeof recX.education_code) {
- return recX.education_code
- }
- return '-'
- },
-}
-
-export const funcComponent: RecStrFuncComponent = {
- action(rec, idx) {
- const res: RecComponent = {
- idx,
- rec: rec as object,
- component: action,
- }
- return res
- },
-}
-
-export const funcHtml: RecStrFuncUnknown = {
- patient_address(_rec) {
- return '-'
+
+ htmls: {
+ patient_address(_rec) {
+ return '-'
+ },
},
}
diff --git a/app/components/app/soapi/list.vue b/app/components/app/soapi/list.vue
index b9a74929..96697bde 100644
--- a/app/components/app/soapi/list.vue
+++ b/app/components/app/soapi/list.vue
@@ -1,5 +1,5 @@
-