Files
simrsx-fe/app/models/person.ts
T
Khafid Prayoga 3fbcdf9e2a refactor(treatment-report): restructure treatment report form and components
- Replace SelectDPJP with SelectDoctor component
- Update schema naming from ActionReport to TreatmentReport
- Add doctor selection functionality to treatment report form
- Improve form layout and field organization
- Update related model imports to use single quotes
- add fragment for better form grouping
- cherry pick form field from another branch
2025-11-25 17:15:00 +07:00

58 lines
1.5 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'
import type { Ethnic } from './ethnic'
import type { Language } from './language'
import type { Regency } from './regency'
export interface Person extends Base {
name: string
// alias?: string
frontTitle?: string
endTitle?: string
birthDate?: 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(),
frontTitle: '[MOCK] dr. ',
name: 'Agus Iwan Setiawan',
endTitle: 'Sp.Bo',
}
}
export function parseName(person: Person): string {
if (!person) return ''
const fullName = [person.frontTitle, person.name, person.endTitle].filter(Boolean).join(' ').trim()
return fullName
}