-
-
+
+
diff --git a/app/components/app/patient/_common/select-disability.vue b/app/components/app/patient/_common/select-disability.vue
index de65a07f..fff15258 100644
--- a/app/components/app/patient/_common/select-disability.vue
+++ b/app/components/app/patient/_common/select-disability.vue
@@ -6,6 +6,8 @@ import Label from '~/components/pub/my-ui/form/label.vue'
import Select from '~/components/pub/my-ui/form/select.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
label?: string
@@ -40,14 +42,14 @@ const disabilityOptions = [
-
-
-
+
-
-
+
+
diff --git a/app/components/app/patient/_common/select-dob.vue b/app/components/app/patient/_common/select-dob.vue
index 938bd254..4c01c6b7 100644
--- a/app/components/app/patient/_common/select-dob.vue
+++ b/app/components/app/patient/_common/select-dob.vue
@@ -7,6 +7,8 @@ import Label from '~/components/pub/my-ui/form/label.vue'
import { Input } from '~/components/pub/ui/input'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
label?: string
@@ -76,15 +78,15 @@ function calculateAge(birthDate: string | Date | undefined): string {
-
-
-
+
-
-
-
-
-
-
+
+
+
+ Usia
+
@@ -137,6 +138,6 @@ function calculateAge(birthDate: string | Date | undefined): string {
-
-
+
+
diff --git a/app/components/app/patient/_common/select-education.vue b/app/components/app/patient/_common/select-education.vue
index 33caac16..95950eb1 100644
--- a/app/components/app/patient/_common/select-education.vue
+++ b/app/components/app/patient/_common/select-education.vue
@@ -7,6 +7,8 @@ import Select from '~/components/pub/my-ui/form/select.vue'
import { educationCodes } from '~/lib/constants'
import { cn, mapToComboboxOptList } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
label?: string
@@ -46,15 +48,15 @@ const educationOptions = [
-
-
-
+
-
-
+
+
diff --git a/app/components/app/patient/_common/select-ethnicity.vue b/app/components/app/patient/_common/select-ethnicity.vue
index e1ecd08a..583a382b 100644
--- a/app/components/app/patient/_common/select-ethnicity.vue
+++ b/app/components/app/patient/_common/select-ethnicity.vue
@@ -6,6 +6,8 @@ import Field from '~/components/pub/my-ui/form/field.vue'
import Label from '~/components/pub/my-ui/form/label.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
label?: string
@@ -49,15 +51,15 @@ const ethnicOptions = [
-
-
-
+
-
-
+
+
diff --git a/app/components/app/patient/_common/select-gender.vue b/app/components/app/patient/_common/select-gender.vue
new file mode 100644
index 00000000..7223b6ac
--- /dev/null
+++ b/app/components/app/patient/_common/select-gender.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/app/patient/_common/select-job.vue b/app/components/app/patient/_common/select-job.vue
index ae8936ac..87c7f966 100644
--- a/app/components/app/patient/_common/select-job.vue
+++ b/app/components/app/patient/_common/select-job.vue
@@ -7,6 +7,8 @@ import Label from '~/components/pub/my-ui/form/label.vue'
import { cn, mapToComboboxOptList } from '~/lib/utils'
import { occupationCodes } from '~/lib/constants'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
label?: string
@@ -34,15 +36,15 @@ const jobOptions = mapToComboboxOptList(occupationCodes)
-
-
-
+
-
-
+
+
diff --git a/app/components/app/patient/_common/select-lang.vue b/app/components/app/patient/_common/select-lang.vue
index aadf9313..0d75112b 100644
--- a/app/components/app/patient/_common/select-lang.vue
+++ b/app/components/app/patient/_common/select-lang.vue
@@ -6,6 +6,8 @@ import Label from '~/components/pub/my-ui/form/label.vue'
import Select from '~/components/pub/my-ui/form/select.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
label?: string
@@ -41,15 +43,15 @@ const langOptions = [
-
-
-
+
-
-
+
+
diff --git a/app/components/app/patient/_common/select-marital-status.vue b/app/components/app/patient/_common/select-marital-status.vue
index cb3b56fb..a857df26 100644
--- a/app/components/app/patient/_common/select-marital-status.vue
+++ b/app/components/app/patient/_common/select-marital-status.vue
@@ -6,6 +6,8 @@ import Label from '~/components/pub/my-ui/form/label.vue'
import Select from '~/components/pub/my-ui/form/select.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
label?: string
@@ -37,15 +39,15 @@ const maritalStatusOptions = [
-
-
-
+
-
-
+
+
diff --git a/app/components/app/patient/_common/select-religion.vue b/app/components/app/patient/_common/select-religion.vue
index 069e3575..76726903 100644
--- a/app/components/app/patient/_common/select-religion.vue
+++ b/app/components/app/patient/_common/select-religion.vue
@@ -7,6 +7,8 @@ import Select from '~/components/pub/my-ui/form/select.vue'
import { religionCodes } from '~/lib/constants'
import { cn, mapToComboboxOptList } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
label?: string
@@ -45,15 +47,15 @@ const religionOptions = [
-
-
-
+
-
-
+
+
diff --git a/app/components/app/patient/entry-form.vue b/app/components/app/patient/entry-form.vue
index 46efdc31..a83189c2 100644
--- a/app/components/app/patient/entry-form.vue
+++ b/app/components/app/patient/entry-form.vue
@@ -7,7 +7,7 @@ import FileUpload from '~/components/pub/my-ui/form/file-field.vue'
import InputName from './_common/input-name.vue'
import RadioCommunicationBarrier from './_common/radio-communication-barrier.vue'
import RadioDisability from './_common/radio-disability.vue'
-import RadioGender from './_common/radio-gender.vue'
+import SelectGender from './_common/select-gender.vue'
import RadioNationality from './_common/radio-nationality.vue'
import RadioNewborn from './_common/radio-newborn.vue'
import SelectBirthPlace from '~/components/app/person/_common/select-birth-place.vue'
@@ -19,6 +19,9 @@ import SelectJob from './_common/select-job.vue'
import SelectLanguage from './_common/select-lang.vue'
import SelectMaritalStatus from './_common/select-marital-status.vue'
import SelectReligion from './_common/select-religion.vue'
+import Separator from '~/components/pub/ui/separator/Separator.vue'
+
+import * as DE from '~/components/pub/my-ui/doc-entry'
const props = defineProps<{
schema: any
@@ -48,205 +51,161 @@ defineExpose({
validation-mode="onSubmit"
:initial-values="initialValues ? initialValues : {}"
>
-
-
Data Diri Pasien
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Data Diri Pasien
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
Dokumen Identitas
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Data Demografis
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Dokumen Identitas
+
+
+
+
diff --git a/app/components/app/patient/list.cfg.ts b/app/components/app/patient/list.cfg.ts
new file mode 100644
index 00000000..d86c8dc1
--- /dev/null
+++ b/app/components/app/patient/list.cfg.ts
@@ -0,0 +1,96 @@
+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-dud.vue'))
+
+export const config: Config = {
+ cols: [{}, {}, {}, {}, {}, {}, {}, { width: 5 }],
+
+ headers: [
+ [
+ { label: 'No. RM' },
+ { label: 'Nama' },
+ { label: 'No. KTP/SIM/Passpor' },
+ { label: 'Tgl Lahir' },
+ { label: 'Umur' },
+ { label: 'Kelamin' },
+ { label: 'Pendidikan' },
+ { label: '' },
+ ],
+ ],
+
+ keys: ['number', 'person.name', 'identity_number', 'birth_date', 'patient_age', 'gender', 'education', '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,
+ }
+ },
+ },
+
+ htmls: {
+ patient_address(_rec) {
+ return '-'
+ },
+ },
+}
diff --git a/app/components/app/patient/list.vue b/app/components/app/patient/list.vue
index c12f409f..8274e752 100644
--- a/app/components/app/patient/list.vue
+++ b/app/components/app/patient/list.vue
@@ -1,7 +1,7 @@
-
-
-
+ {
-
-
+
+
diff --git a/app/components/app/person-address/_common/select-postal.vue b/app/components/app/person-address/_common/select-postal.vue
index 438fb9a9..56867c7f 100644
--- a/app/components/app/person-address/_common/select-postal.vue
+++ b/app/components/app/person-address/_common/select-postal.vue
@@ -6,6 +6,8 @@ import Field from '~/components/pub/my-ui/form/field.vue'
import Label from '~/components/pub/my-ui/form/label.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName: string
villageCode?: string
@@ -36,14 +38,14 @@ const isFieldDisabled = computed(() => {
-
-
-
+ {
-
-
+
+
diff --git a/app/components/app/person-address/_common/select-province.vue b/app/components/app/person-address/_common/select-province.vue
index 829cbe45..ca6dd51a 100644
--- a/app/components/app/person-address/_common/select-province.vue
+++ b/app/components/app/person-address/_common/select-province.vue
@@ -6,6 +6,8 @@ import Field from '~/components/pub/my-ui/form/field.vue'
import Label from '~/components/pub/my-ui/form/label.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
isDisabled?: boolean
@@ -42,14 +44,14 @@ const isFieldDisabled = computed(() => {
-
-
-
+ {
-
-
+
+
diff --git a/app/components/app/person-address/_common/select-regency.vue b/app/components/app/person-address/_common/select-regency.vue
index e54f93eb..8fbf6f23 100644
--- a/app/components/app/person-address/_common/select-regency.vue
+++ b/app/components/app/person-address/_common/select-regency.vue
@@ -6,6 +6,8 @@ import Field from '~/components/pub/my-ui/form/field.vue'
import Label from '~/components/pub/my-ui/form/label.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
provinceCode?: string
@@ -45,14 +47,14 @@ const isFieldDisabled = computed(() => {
-
-
-
+ {
-
-
+
+
diff --git a/app/components/app/person-address/_common/select-village.vue b/app/components/app/person-address/_common/select-village.vue
index 5d8f4737..9684954f 100644
--- a/app/components/app/person-address/_common/select-village.vue
+++ b/app/components/app/person-address/_common/select-village.vue
@@ -6,6 +6,8 @@ import Field from '~/components/pub/my-ui/form/field.vue'
import Label from '~/components/pub/my-ui/form/label.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
districtCode?: string
@@ -45,14 +47,14 @@ const isFieldDisabled = computed(() => {
-
-
-
+ {
-
-
+
+
diff --git a/app/components/app/person-address/entry-form-relative.vue b/app/components/app/person-address/entry-form-relative.vue
index e2e14938..cc294bab 100644
--- a/app/components/app/person-address/entry-form-relative.vue
+++ b/app/components/app/person-address/entry-form-relative.vue
@@ -15,6 +15,8 @@ import SelectRegency from './_common/select-regency.vue'
import SelectVillage from './_common/select-village.vue'
import { Form } from '~/components/pub/ui/form'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
title: string
conf?: {
@@ -260,157 +262,133 @@ watch(
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- componentField.onChange(value)"
- class="flex flex-row flex-wrap gap-4 sm:gap-6"
- >
-
-
-
- {{ option.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ componentField.onChange(value)"
+ class="flex flex-row flex-wrap gap-4 sm:gap-6"
+ >
+
+
+
+ {{ option.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
diff --git a/app/components/app/person-address/entry-form.vue b/app/components/app/person-address/entry-form.vue
index 1c9998d7..b3ef300d 100644
--- a/app/components/app/person-address/entry-form.vue
+++ b/app/components/app/person-address/entry-form.vue
@@ -12,6 +12,8 @@ import SelectRegency from './_common/select-regency.vue'
import SelectVillage from './_common/select-village.vue'
import { Form } from '~/components/pub/ui/form'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
title: string
conf?: {
@@ -167,100 +169,77 @@ watch(
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/app/components/app/person-contact/entry-form.vue b/app/components/app/person-contact/entry-form.vue
index 9dc83541..431a3c79 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/app/person/_common/select-birth-place.vue b/app/components/app/person/_common/select-birth-place.vue
index d4601c26..dd61a69f 100644
--- a/app/components/app/person/_common/select-birth-place.vue
+++ b/app/components/app/person/_common/select-birth-place.vue
@@ -6,6 +6,8 @@ import Field from '~/components/pub/my-ui/form/field.vue'
import Label from '~/components/pub/my-ui/form/label.vue'
import { cn } from '~/lib/utils'
+import * as DE from '~/components/pub/my-ui/doc-entry'
+
const props = defineProps<{
fieldName?: string
isDisabled?: boolean
@@ -49,11 +51,11 @@ onMounted(() => {
-
-
-
+
+
@@ -70,6 +72,6 @@ onMounted(() => {
-
-
+
+
diff --git a/app/components/app/person/family-parents-form.vue b/app/components/app/person/family-parents-form.vue
index e5ac4a46..fc87ce45 100644
--- a/app/components/app/person/family-parents-form.vue
+++ b/app/components/app/person/family-parents-form.vue
@@ -65,7 +65,7 @@ defineExpose({
{{ props.title }}
diff --git a/app/components/content/patient/entry.vue b/app/components/content/patient/entry.vue
index 8e4d8cb4..2eed6df5 100644
--- a/app/components/content/patient/entry.vue
+++ b/app/components/content/patient/entry.vue
@@ -268,21 +268,25 @@ watch(
ref="personPatientForm"
:schema="PatientSchema"
/>
+
+
+
+