refactor(patient): rename PatientEntity to Patient and update related components
Update interface name from PatientEntity to Patient for better clarity and consistency. Modify all related components and models to use the new interface name. Also includes minor improvements to address handling in patient forms.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { withBase } from '~/models/_base'
|
||||
import type { HeaderPrep } from '~/components/pub/my-ui/data/types'
|
||||
import type { PatientEntity } from '~/models/patient'
|
||||
import type { Patient } from '~/models/patient'
|
||||
import type { Person } from '~/models/person'
|
||||
|
||||
// Components
|
||||
@@ -18,7 +18,7 @@ const props = defineProps<{
|
||||
|
||||
// #region State & Computed
|
||||
const patient = ref(
|
||||
withBase<PatientEntity>({
|
||||
withBase<Patient>({
|
||||
person: {} as Person,
|
||||
personAddresses: [],
|
||||
personContacts: [],
|
||||
@@ -74,7 +74,7 @@ function handleAction(type: string) {
|
||||
class="mb-4 border-b-2 border-b-slate-300 pb-2 xl:mb-5"
|
||||
/>
|
||||
<AppPatientPreview
|
||||
:person="patient.person"
|
||||
:patient="patient"
|
||||
@click="handleAction"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { PatientEntity, genPatientProps } from '~/models/patient'
|
||||
import type { Patient, genPatientProps } from '~/models/patient'
|
||||
import type { ExposedForm } from '~/types/form'
|
||||
import type { PatientBase } from '~/models/patient'
|
||||
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
||||
@@ -16,7 +16,7 @@ import { postPatient } from '~/services/patient.service'
|
||||
const props = defineProps<{
|
||||
callbackUrl?: string
|
||||
}>()
|
||||
const payload = ref<PatientEntity>()
|
||||
const payload = ref<Patient>()
|
||||
|
||||
// form related state
|
||||
const personAddressForm = ref<ExposedForm<any> | null>(null)
|
||||
|
||||
Reference in New Issue
Block a user