- Add medicalActionTypeCode constants and type definition - Update MedicalActionSrc interface to use strict type for type_code - Implement select dropdown for type code in entry form - Enable type code validation in schema
20 lines
404 B
TypeScript
20 lines
404 B
TypeScript
import { type Base, genBase } from './_base'
|
|
import type { medicalActionTypeCodeKey } from '~/lib/constants'
|
|
|
|
export interface MedicalActionSrc extends Base {
|
|
code: string
|
|
name: string
|
|
type_code: medicalActionTypeCodeKey
|
|
item_id: number
|
|
}
|
|
|
|
export function genMedicalActionSrc(): MedicalActionSrc {
|
|
return {
|
|
...genBase(),
|
|
code: '',
|
|
name: '',
|
|
type_code: '',
|
|
item_id: 0,
|
|
}
|
|
}
|