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
This commit is contained in:
Khafid Prayoga
2025-11-25 15:32:58 +07:00
parent 7ee6f40196
commit 3fbcdf9e2a
15 changed files with 532 additions and 46 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
import { type Base, genBase } from "./_base"
import { type Employee, genEmployee } from "./employee"
import type { Specialist } from "./specialist"
import type { Subspecialist } from "./subspecialist"
import { type Base, genBase } from './_base'
import { type Employee, genEmployee } from './employee'
import type { Specialist } from './specialist'
import type { Subspecialist } from './subspecialist'
export interface Doctor extends Base {
employee_id: number
+14 -5
View File
@@ -1,7 +1,7 @@
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 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'
@@ -43,6 +43,15 @@ export interface Person extends Base {
export function genPerson(): Person {
return {
...genBase(),
name: '',
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
}