a5d5e8acd1
Move address, contact and relative data into nested properties of Person model Update preview component to access data through person object Remove separate props for addresses, contacts and relatives
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { type Base, genBase } from './_base'
|
|
import type { PersonAddress } from './person-address'
|
|
import type { PersonContact } from './person-contact'
|
|
import type { PersonRelative } from './person-relative'
|
|
|
|
export interface Person extends Base {
|
|
name: string
|
|
// alias?: string
|
|
frontTitle?: string
|
|
endTitle?: string
|
|
birthDate?: Date | string
|
|
birthRegency_code?: string
|
|
gender_code?: string
|
|
residentIdentityNumber?: string
|
|
passportNumber?: string
|
|
drivingLicenseNumber?: string
|
|
religion_code?: string
|
|
education_code?: string
|
|
occupation_code?: string
|
|
occupation_name?: string
|
|
ethnic_code?: string
|
|
language_code?: string
|
|
nationality?: string
|
|
communicationIssueStatus?: boolean
|
|
disability?: string
|
|
residentIdentityFileUrl?: string
|
|
passportFileUrl?: string
|
|
drivingLicenseFileUrl?: string
|
|
familyIdentityFileUrl?: string
|
|
|
|
// preload data for detail patient
|
|
addresses?: PersonAddress[] | null
|
|
contacts?: PersonContact[] | null
|
|
relatives?: PersonRelative[] | null
|
|
}
|
|
|
|
export function genPerson(): Person {
|
|
return {
|
|
...genBase(),
|
|
name: '',
|
|
}
|
|
}
|