Files
simrsx-fe/app/models/person.ts
T
Khafid Prayoga ea04f33ad1 refactor(address): update address models and forms to use standardized fields
- Add preload relationships to address-related models
- Rename postalCode to postalCode_code for consistency
- Simplify location type handling with hidden fields
- Update validation schemas and form components
- Improve address display in patient preview
2025-10-10 15:36:54 +07:00

49 lines
1.3 KiB
TypeScript

import { type Base, genBase } from './_base'
import type { Ethnic } from './ethnic'
import type { Language } from './language'
import type { PersonAddress } from './person-address'
import type { PersonContact } from './person-contact'
import type { PersonRelative } from './person-relative'
import type { Regency } from './regency'
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
birthRegency?: Regency | null
addresses?: PersonAddress[] | null
contacts?: PersonContact[] | null
relatives?: PersonRelative[] | null
ethnic?: Ethnic | null
language?: Language | null
}
export function genPerson(): Person {
return {
...genBase(),
name: '',
}
}