diff --git a/app/assets/css/main.css b/app/assets/css/main.css index cab62d6e..17502027 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -174,7 +174,7 @@ body { } body, table, label { - @apply md:!text-xs 2xl:!text-sm; + @apply md:!text-xs 2xl:!text-sm; } /* Container */ diff --git a/app/components/app/encounter/entry-form.vue b/app/components/app/encounter/entry-form.vue index fd6c8da9..25bdf9d8 100644 --- a/app/components/app/encounter/entry-form.vue +++ b/app/components/app/encounter/entry-form.vue @@ -108,248 +108,246 @@ function onAddSep() { :initial-values="initialValues" >
-
-
-
-

Data Pasien

-
-
- - Sudah pernah terdaftar sebagai pasien? - - - - Belum pernah terdaftar sebagai pasien? - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Data Kunjungan

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - -
-
- -
-
-
-
- - - - - - - - -
- - - -
-
- -
-
-
-
- +
+
+ Data Pasien
+
+ + Sudah pernah terdaftar sebagai pasien? + + + + Belum pernah terdaftar sebagai pasien? + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Data Kunjungan +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+
+
+ + + + + + + + +
+ + + +
+
+ +
+
+
+
+
diff --git a/app/components/app/patient/_common/input-name.vue b/app/components/app/patient/_common/input-name.vue index 933612d3..db9005f1 100644 --- a/app/components/app/patient/_common/input-name.vue +++ b/app/components/app/patient/_common/input-name.vue @@ -1,11 +1,11 @@ diff --git a/app/components/app/patient/_common/radio-communication-barrier.vue b/app/components/app/patient/_common/radio-communication-barrier.vue index 463b3659..dcc140e2 100644 --- a/app/components/app/patient/_common/radio-communication-barrier.vue +++ b/app/components/app/patient/_common/radio-communication-barrier.vue @@ -7,6 +7,8 @@ import { Label as RadioLabel } from '~/components/pub/ui/label' import { RadioGroup, RadioGroupItem } from '~/components/pub/ui/radio-group' import { cn } from '~/lib/utils' +import * as DE from '~/components/pub/my-ui/doc-entry' + const props = defineProps<{ fieldName?: string label?: string @@ -35,18 +37,19 @@ const genderOptions = [ diff --git a/app/components/app/patient/_common/radio-disability.vue b/app/components/app/patient/_common/radio-disability.vue index 312c3730..5d04351c 100644 --- a/app/components/app/patient/_common/radio-disability.vue +++ b/app/components/app/patient/_common/radio-disability.vue @@ -7,6 +7,8 @@ import { Label as RadioLabel } from '~/components/pub/ui/label' import { RadioGroup, RadioGroupItem } from '~/components/pub/ui/radio-group' import { cn } from '~/lib/utils' +import * as DE from '~/components/pub/my-ui/doc-entry' + const props = defineProps<{ fieldName?: string label?: string @@ -35,17 +37,18 @@ const dissabilityOptions = [ diff --git a/app/components/app/patient/_common/radio-gender.vue b/app/components/app/patient/_common/radio-gender.vue index 108b1d22..5c608c16 100644 --- a/app/components/app/patient/_common/radio-gender.vue +++ b/app/components/app/patient/_common/radio-gender.vue @@ -8,6 +8,8 @@ import { RadioGroup, RadioGroupItem } from '~/components/pub/ui/radio-group' import { genderCodes } 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 @@ -33,15 +35,15 @@ const genderOptions = mapToComboboxOptList(genderCodes) diff --git a/app/components/app/patient/_common/radio-nationality.vue b/app/components/app/patient/_common/radio-nationality.vue index 9c0eef1d..cae144ab 100644 --- a/app/components/app/patient/_common/radio-nationality.vue +++ b/app/components/app/patient/_common/radio-nationality.vue @@ -7,6 +7,8 @@ import { Label as RadioLabel } from '~/components/pub/ui/label' import { RadioGroup, RadioGroupItem } from '~/components/pub/ui/radio-group' import { cn } from '~/lib/utils' +import * as DE from '~/components/pub/my-ui/doc-entry' + const props = defineProps<{ fieldName?: string label?: string @@ -35,17 +37,18 @@ const nationalityOptions = [ diff --git a/app/components/app/patient/_common/radio-newborn.vue b/app/components/app/patient/_common/radio-newborn.vue index 94837930..11421e30 100644 --- a/app/components/app/patient/_common/radio-newborn.vue +++ b/app/components/app/patient/_common/radio-newborn.vue @@ -7,6 +7,8 @@ import { Label as RadioLabel } from '~/components/pub/ui/label' import { RadioGroup, RadioGroupItem } from '~/components/pub/ui/radio-group' import { cn } from '~/lib/utils' +import * as DE from '~/components/pub/my-ui/doc-entry' + const props = defineProps<{ fieldName?: string label?: string @@ -35,14 +37,14 @@ const newbornOptions = [ 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 { 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 @@ + + + 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

- -
- - - -
-
- - - -
-
- -
-

Kondisi Khusus

-
- -
- - -
- - -
-
+

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(

{{ props.title }}

-
-
- - - - - - - - - -
- - - {{ option.label }} - -
-
-
- -
-
-
-
- - -
-
- -
- -
- -
-
- -
-
- -
-
- -
-
- + + + + + +
+ + + {{ 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(

{{ props.title }}

-
-
- - - + + + + + + + + + + +
+ + - - -
-
- -
- -
- -
- -
-
- -
-
- -
-
- - + -
-
- -
- -
- -
- -
- -
-
-
-
+ 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(() => { 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" /> +
+
+
+