feat(sep): fix get patient data
This commit is contained in:
@@ -32,7 +32,6 @@ const emit = defineEmits<{
|
||||
|
||||
const isLoading = props.isLoading !== undefined ? props.isLoading : false
|
||||
const isReadonly = props.isReadonly !== undefined ? props.isReadonly : false
|
||||
const patient = props.patient || ({} as PatientEntity)
|
||||
|
||||
const items = [
|
||||
{ value: 'item-1', label: 'Item 1' },
|
||||
@@ -63,21 +62,21 @@ const [cataract, cataractAttrs] = defineField('cataract')
|
||||
const [procedureType, procedureTypeAttrs] = defineField('procedureType')
|
||||
const [supportCode, supportCodeAttrs] = defineField('supportCode')
|
||||
|
||||
if (Object.keys(patient).length > 0) {
|
||||
bpjsNumber.value = '-'
|
||||
nationalId.value = patient?.person?.residentIdentityNumber || '-'
|
||||
medicalRecordNumber.value = patient?.number || '-'
|
||||
patientName.value = patient?.person?.name || '-'
|
||||
phoneNumber.value = '-'
|
||||
}
|
||||
|
||||
// Submit handler
|
||||
const onSubmit = handleSubmit((values) => {
|
||||
console.log('✅ Validated form values:', values)
|
||||
})
|
||||
|
||||
watch(patient, () => {
|
||||
console.log('patient changed:', patient)
|
||||
watch(props, (value) => {
|
||||
console.log('patient changed:', value)
|
||||
const patient = value.patient || ({} as PatientEntity)
|
||||
if (Object.keys(patient).length > 0) {
|
||||
bpjsNumber.value = '-'
|
||||
nationalId.value = patient?.person?.residentIdentityNumber || '-'
|
||||
medicalRecordNumber.value = patient?.number || '-'
|
||||
patientName.value = patient?.person?.name || '-'
|
||||
phoneNumber.value = '-'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user