Merge branch 'dev' of github.com:dikstub-rssa/simrs-fe into feat/education-assessment-79
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import type { AntibioticSrc } from "./antibiotic-src"
|
||||
|
||||
export interface AntibioticInUse extends Base {
|
||||
mcuOrder_id: number
|
||||
antibioticSrc_code: string
|
||||
antibioticSrc: AntibioticSrc
|
||||
}
|
||||
|
||||
export function genDevice(): Pick<AntibioticInUse, 'mcuOrder_id' | 'antibioticSrc_code'> {
|
||||
return {
|
||||
...genBase(),
|
||||
mcuOrder_id: 0,
|
||||
antibioticSrc_code: ''
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
export interface AntibioticSrcCategory extends Base {
|
||||
code: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export function genDevice(): AntibioticSrcCategory {
|
||||
return {
|
||||
...genBase(),
|
||||
code: '',
|
||||
name: '',
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
export interface AntibioticSrc extends Base {
|
||||
code: string
|
||||
name: string
|
||||
antibioticSrcCategory_code: string
|
||||
}
|
||||
|
||||
export function genDevice(): AntibioticSrc {
|
||||
return {
|
||||
...genBase(),
|
||||
code: '',
|
||||
name: '',
|
||||
antibioticSrcCategory_code: ''
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ export interface Consultation {
|
||||
id: number
|
||||
encounter_id: number
|
||||
date?: string
|
||||
unit_id: number
|
||||
doctor_id?: number
|
||||
unit_code: number
|
||||
doctor_code?: number
|
||||
problem: string
|
||||
solution?: string
|
||||
repliedAt?: string
|
||||
@@ -13,13 +13,13 @@ export interface CreateDto {
|
||||
encounter_id: number
|
||||
date: string
|
||||
problem: string
|
||||
dstUnit_id: number
|
||||
dstUnit_code: string
|
||||
}
|
||||
|
||||
export interface UpdateDto {
|
||||
id: number
|
||||
problem: string
|
||||
unit_id: number
|
||||
unit_code: number
|
||||
}
|
||||
|
||||
export interface DeleteDto {
|
||||
@@ -28,9 +28,10 @@ export interface DeleteDto {
|
||||
|
||||
export function genCreateDto(): CreateDto {
|
||||
return {
|
||||
date: '',
|
||||
encounter_id: 0,
|
||||
problem: '',
|
||||
unit_id: 0,
|
||||
dstUnit_code: '',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +39,8 @@ export function genConsultation(): Consultation {
|
||||
return {
|
||||
id: 0,
|
||||
encounter_id: 0,
|
||||
unit_id: 0,
|
||||
doctor_id: 0,
|
||||
unit_code: 0,
|
||||
doctor_code: 0,
|
||||
problem: '',
|
||||
solution: '',
|
||||
repliedAt: '',
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { genDoctor, type Doctor } from "./doctor"
|
||||
import { genEncounter, type Encounter } from "./encounter"
|
||||
import { genSpecialist, type Specialist } from "./specialist"
|
||||
import { genSubspecialist, type Subspecialist } from "./subspecialist"
|
||||
import { genUnit, type Unit } from "./unit"
|
||||
|
||||
export interface ControlLetter extends Base {
|
||||
encounter_id: number
|
||||
encounter: Encounter
|
||||
unit_id: number
|
||||
unit: Unit
|
||||
specialist_id: number
|
||||
specialist: Specialist
|
||||
subspecialist_id: number
|
||||
subspecialist: Subspecialist
|
||||
doctor_id: number
|
||||
doctor: Doctor
|
||||
date: ''
|
||||
}
|
||||
|
||||
export function genControlLetter(): ControlLetter {
|
||||
return {
|
||||
...genBase(),
|
||||
encounter_id: 0,
|
||||
encounter: genEncounter(),
|
||||
unit_id: 0,
|
||||
unit: genUnit(),
|
||||
specialist_id: 0,
|
||||
specialist: genSpecialist(),
|
||||
subspecialist_id: 0,
|
||||
subspecialist: genSubspecialist(),
|
||||
doctor_id: 0,
|
||||
doctor: genDoctor(),
|
||||
date: ''
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface DeathCause {
|
||||
id: bigint;
|
||||
encounter_id: bigint;
|
||||
value: any; // json mapped to 'any' type
|
||||
}
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { genDevice, type Device } from "./device"
|
||||
|
||||
export interface DeviceOrderItem extends Base {
|
||||
deviceOrder_id: number
|
||||
device_id: number
|
||||
count: number
|
||||
device_code: string
|
||||
device: Device
|
||||
quantity: number
|
||||
}
|
||||
|
||||
export function genDeviceOrderItem(): DeviceOrderItem {
|
||||
return {
|
||||
...genBase(),
|
||||
deviceOrder_id: 0,
|
||||
device_id: 0,
|
||||
count: 0,
|
||||
device_code: '',
|
||||
device: genDevice(),
|
||||
quantity: 0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,21 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import type { DeviceOrderItem } from "./device-order-item"
|
||||
import { genDoctor, type Doctor } from "./doctor"
|
||||
|
||||
export interface DeviceOrder extends Base {
|
||||
encounter_id: number
|
||||
doctor_id: number
|
||||
doctor_code: number
|
||||
doctor: Doctor
|
||||
status_code?: string
|
||||
items: DeviceOrderItem[]
|
||||
}
|
||||
|
||||
export function genDeviceOrder(): DeviceOrder {
|
||||
return {
|
||||
...genBase(),
|
||||
encounter_id: 0,
|
||||
doctor_id: 0,
|
||||
doctor_code: 0,
|
||||
doctor: genDoctor(),
|
||||
items: []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { type Base, genBase } from './_base'
|
||||
|
||||
import type { Employee } from './employee'
|
||||
export interface DivisionPosition extends Base {
|
||||
code: string
|
||||
name: string
|
||||
headStatus?: boolean
|
||||
division_id: number
|
||||
division_id: string
|
||||
employee_id?: number
|
||||
|
||||
employee?: Employee | null
|
||||
}
|
||||
|
||||
export function genDivisionPosition(): DivisionPosition {
|
||||
@@ -14,7 +16,7 @@ export function genDivisionPosition(): DivisionPosition {
|
||||
code: '',
|
||||
name: '',
|
||||
headStatus: false,
|
||||
division_id: 0,
|
||||
division_id: '',
|
||||
employee_id: 0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
import { type Base, genBase } from './_base'
|
||||
import type { DivisionPosition } from './division-position'
|
||||
export interface Division extends Base {
|
||||
code: string
|
||||
name: string
|
||||
parent_id?: number | null
|
||||
childrens?: Division[] | null
|
||||
|
||||
// preload
|
||||
divisionPosition?: DivisionPosition[] | null
|
||||
}
|
||||
|
||||
export function genDivision(): Division {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { type Employee, genEmployee } from "./employee"
|
||||
import type { Unit } from "./unit"
|
||||
import type { Specialist } from "./specialist"
|
||||
import type { Subspecialist } from "./subspecialist"
|
||||
|
||||
@@ -8,10 +9,12 @@ export interface Doctor extends Base {
|
||||
employee: Employee
|
||||
ihs_number: string
|
||||
sip_number: string
|
||||
unit_id?: number
|
||||
specialist_id?: number
|
||||
code?: string
|
||||
unit_code?: string
|
||||
unit?: Unit
|
||||
specialist_code?: string
|
||||
specialist?: Specialist
|
||||
subspecialist_id?: number
|
||||
subspecialist_code?: string
|
||||
subspecialist?: Subspecialist
|
||||
bpjs_code?: string
|
||||
}
|
||||
@@ -21,9 +24,9 @@ export interface CreateDto {
|
||||
employee_id: number
|
||||
ihs_number: string
|
||||
sip_number: string
|
||||
unit_id?: number
|
||||
specialist_id?: number
|
||||
subspecialist_id?: number
|
||||
unit_code?: number
|
||||
specialist_code?: number
|
||||
subspecialist_code?: number
|
||||
bpjs_code: string
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { docTypeLabel, } from '~/lib/constants'
|
||||
import { genEmployee, type Employee } from "./employee"
|
||||
import { genEncounter, type Encounter } from "./encounter"
|
||||
|
||||
export interface EncounterDocument extends Base {
|
||||
encounter_id: number
|
||||
encounter?: Encounter
|
||||
upload_employee_id: number
|
||||
employee?: Employee
|
||||
type_code: string
|
||||
name: string
|
||||
filePath: string
|
||||
fileName: string
|
||||
}
|
||||
|
||||
export function genEncounterDocument(): EncounterDocument {
|
||||
return {
|
||||
...genBase(),
|
||||
encounter_id: 2,
|
||||
encounter: genEncounter(),
|
||||
upload_employee_id: 0,
|
||||
employee: genEmployee(),
|
||||
type_code: docTypeLabel["encounter-patient"],
|
||||
name: 'example',
|
||||
filePath: 'https://bing.com',
|
||||
fileName: 'example',
|
||||
}
|
||||
}
|
||||
+21
-9
@@ -1,5 +1,9 @@
|
||||
import type { DeathCause } from "./death-cause"
|
||||
import { type Doctor, genDoctor } from "./doctor"
|
||||
import { genEmployee, type Employee } from "./employee"
|
||||
import type { EncounterDocument } from "./encounter-document"
|
||||
import type { InternalReference } from "./internal-reference"
|
||||
import type { Nurse } from "./nurse"
|
||||
import { type Patient, genPatient } from "./patient"
|
||||
import type { Specialist } from "./specialist"
|
||||
import type { Subspecialist } from "./subspecialist"
|
||||
@@ -11,27 +15,34 @@ export interface Encounter {
|
||||
patient: Patient
|
||||
registeredAt: string
|
||||
class_code: string
|
||||
unit_id: number
|
||||
unit_code: string
|
||||
unit: Unit
|
||||
specialist_id?: number
|
||||
specialist_code?: string
|
||||
specilist?: Specialist
|
||||
subspecialist_id?: number
|
||||
subspecialist_code?: string
|
||||
subspecialist?: Subspecialist
|
||||
visitDate: string
|
||||
adm_employee_id: number
|
||||
adm_employee: Employee
|
||||
appointment_doctor_id: number
|
||||
responsible_nurse_code?: string
|
||||
responsible_nurse?: Nurse
|
||||
appointment_doctor_code: string
|
||||
appointment_doctor: Doctor
|
||||
responsible_doctor_id?: number
|
||||
responsible_doctor_code?: string
|
||||
responsible_doctor?: Doctor
|
||||
refSource_name?: string
|
||||
appointment_id?: number
|
||||
earlyEducation?: string
|
||||
medicalDischargeEducation: string
|
||||
admDischargeEducation?: string
|
||||
dischargeMethod_code?: string
|
||||
discharge_method_code?: string
|
||||
discharge_reason?: string
|
||||
discharge_date?: string
|
||||
internalReferences?: InternalReference[]
|
||||
deathCause?: DeathCause
|
||||
paymentMethod_code?: string
|
||||
status_code: string
|
||||
encounterDocuments: EncounterDocument[]
|
||||
}
|
||||
|
||||
export function genEncounter(): Encounter {
|
||||
@@ -41,15 +52,16 @@ export function genEncounter(): Encounter {
|
||||
patient: genPatient(),
|
||||
registeredAt: '',
|
||||
class_code: '',
|
||||
unit_id: 0,
|
||||
unit_code: '',
|
||||
unit: genUnit(),
|
||||
visitDate: '',
|
||||
adm_employee_id: 0,
|
||||
adm_employee: genEmployee(),
|
||||
appointment_doctor_id: 0,
|
||||
appointment_doctor_code: '',
|
||||
appointment_doctor: genDoctor(),
|
||||
medicalDischargeEducation: '',
|
||||
status_code: ''
|
||||
status_code: '',
|
||||
encounterDocuments: [],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
export interface GeneralConsent {
|
||||
id: number
|
||||
encounter_id: number
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface ValueCreateDto {
|
||||
relatives: string[]
|
||||
responsibleName: string
|
||||
responsiblePhone: string
|
||||
informant: string
|
||||
witness1: string
|
||||
witness2: string
|
||||
}
|
||||
|
||||
export interface CreateDto {
|
||||
encounter_id: number
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface UpdateDto {
|
||||
id: number
|
||||
problem: string
|
||||
unit_id: number
|
||||
}
|
||||
|
||||
export interface DeleteDto {
|
||||
id: number
|
||||
}
|
||||
|
||||
export function genCreateDto(): CreateDto {
|
||||
return {
|
||||
encounter_id: 0,
|
||||
problem: '',
|
||||
unit_id: 0,
|
||||
}
|
||||
}
|
||||
|
||||
export function genConsultation(): GeneralConsent {
|
||||
return {
|
||||
id: 0,
|
||||
encounter_id: 0,
|
||||
unit_id: 0,
|
||||
doctor_id: 0,
|
||||
problem: '',
|
||||
solution: '',
|
||||
repliedAt: '',
|
||||
}
|
||||
}
|
||||
+20
-3
@@ -1,10 +1,27 @@
|
||||
export interface Infra {
|
||||
id?: number
|
||||
import { type Base, genBase } from "./_base";
|
||||
import { genProcedureRoom, type ProcedureRoom } from "./procedure-room";
|
||||
|
||||
export interface Infra extends Base {
|
||||
code: string
|
||||
name: string
|
||||
infraGroup_code: string
|
||||
parent_id?: number | string | null
|
||||
unit_id?: number | string | null
|
||||
specialist_id?: number | string | null
|
||||
subspecialist_id?: number | string | null
|
||||
unit_id?: number | string | null
|
||||
procedureRoom?: ProcedureRoom
|
||||
}
|
||||
|
||||
export function genInfra(): Infra {
|
||||
return {
|
||||
...genBase(),
|
||||
code: '',
|
||||
name: '',
|
||||
infraGroup_code: '',
|
||||
parent_id: null,
|
||||
unit_id: null,
|
||||
specialist_id: null,
|
||||
subspecialist_id: null,
|
||||
procedureRoom: genProcedureRoom(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import { type Base, genBase } from './_base'
|
||||
import type { Employee } from './employee'
|
||||
|
||||
export interface InstallationPosition extends Base {
|
||||
installation_id: number
|
||||
code: string
|
||||
name: string
|
||||
headStatus?: boolean
|
||||
employee_id?: number
|
||||
|
||||
employee?: Employee | null
|
||||
}
|
||||
|
||||
export function genInstallationPosition(): InstallationPosition {
|
||||
return {
|
||||
...genBase(),
|
||||
installation_id: 0,
|
||||
code: '',
|
||||
name: '',
|
||||
headStatus: false,
|
||||
employee_id: 0,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
export interface InternalReference {
|
||||
id: number;
|
||||
encounter_id: number;
|
||||
unit_id: number; // smallint mapped to number
|
||||
doctor_id: number; // int mapped to number
|
||||
}
|
||||
|
||||
export interface CreateDto {
|
||||
encounter_id: number;
|
||||
unit_id: number; // smallint mapped to number
|
||||
doctor_id: number; // int mapped to number
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
export interface MaterialPackageItem extends Base {
|
||||
materialPackage_code: string
|
||||
material_code: string
|
||||
}
|
||||
|
||||
export function genMaterialPackage(): MaterialPackageItem {
|
||||
return {
|
||||
...genBase(),
|
||||
materialPackage_code: '',
|
||||
material_code: '',
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
export interface MaterialPackage extends Base {
|
||||
code: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export function genMaterialPackage(): MaterialPackage {
|
||||
return {
|
||||
...genBase(),
|
||||
code: '',
|
||||
name: '',
|
||||
}
|
||||
}
|
||||
@@ -2,16 +2,33 @@ import { type Base, genBase } from "./_base"
|
||||
|
||||
export interface McuOrderItem extends Base {
|
||||
mcuOrder_id: number
|
||||
mcuSrc_id: number
|
||||
mcuSrc_code: string
|
||||
note?: string
|
||||
examinationDate?: string
|
||||
result?: string
|
||||
status_code?: string
|
||||
}
|
||||
|
||||
export interface CreateDto {
|
||||
mcuOrder_id: number
|
||||
mcuSrc_code: string
|
||||
note?: string
|
||||
}
|
||||
|
||||
export interface ReadList {
|
||||
'mcu-order-id'?: number
|
||||
'mcu-src-code'?: string
|
||||
includes?: string
|
||||
}
|
||||
|
||||
export interface UpdateDto extends CreateDto {
|
||||
id: number
|
||||
}
|
||||
|
||||
export function genMcuOrderItem(): McuOrderItem {
|
||||
return {
|
||||
...genBase(),
|
||||
mcuOrder_id: 0,
|
||||
mcuSrc_id: 0,
|
||||
mcuSrc_code: '',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
export interface McuOrderSubItem extends Base {
|
||||
mcuSubSrc_id: number
|
||||
mcuOrderItem_id: number
|
||||
mcuSubSrc_code: string
|
||||
result?: string
|
||||
status_code?: string
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export interface McuOrderSubItem extends Base {
|
||||
export function genMcuOrderSubItem(): McuOrderSubItem {
|
||||
return {
|
||||
...genBase(),
|
||||
mcuSubSrc_id: 0,
|
||||
mcuOrderItem_id: 0,
|
||||
mcuSubSrc_code: '',
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -1,14 +1,20 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import type { AntibioticInUse } from "./antibiotic-in-use"
|
||||
import { type Doctor, genDoctor } from "./doctor"
|
||||
import type { McuOrderItem } from "./mcu-order-item"
|
||||
|
||||
export interface McuOrder extends Base {
|
||||
encounter_id: number
|
||||
doctor_id: number
|
||||
doctor: Doctor
|
||||
status_code?: string
|
||||
specimenPickTime: string
|
||||
examinationDate: string
|
||||
number?: number
|
||||
temperature?: number
|
||||
mcuUrgencyLevel_code?: string
|
||||
items: McuOrderItem[]
|
||||
antibioticInUseItems: AntibioticInUse[]
|
||||
}
|
||||
|
||||
export function genMcuOrder(): McuOrder {
|
||||
@@ -16,8 +22,11 @@ export function genMcuOrder(): McuOrder {
|
||||
...genBase(),
|
||||
encounter_id: 0,
|
||||
doctor_id: 0,
|
||||
doctor: genDoctor(),
|
||||
specimenPickTime: '',
|
||||
examinationDate: ''
|
||||
examinationDate: '',
|
||||
items: [],
|
||||
antibioticInUseItems: [],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
export interface MedicineForm extends Base {
|
||||
name: string
|
||||
code: string
|
||||
}
|
||||
|
||||
export interface CreateDto {
|
||||
name: string
|
||||
code: string
|
||||
}
|
||||
|
||||
export interface GetListDto {
|
||||
page: number
|
||||
size: number
|
||||
name?: string
|
||||
code?: string
|
||||
}
|
||||
|
||||
export interface GetDetailDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export interface UpdateDto extends CreateDto {
|
||||
id?: number
|
||||
}
|
||||
|
||||
export interface DeleteDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export function genMedicine(): MedicineForm {
|
||||
return {
|
||||
...genBase(),
|
||||
name: 'name',
|
||||
code: 'code',
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,17 @@
|
||||
import type { MedicineFormData } from "~/schemas/medicine.schema"
|
||||
import { type Base, genBase } from "./_base"
|
||||
import type { MedicineGroup } from "./medicine-group"
|
||||
import type { MedicineMethod } from "./medicine-method"
|
||||
|
||||
export interface Medicine extends Base {
|
||||
code: string
|
||||
name: string
|
||||
medicineGroup_code: string
|
||||
medicineMethod_code: string
|
||||
medicineGroup_code?: string
|
||||
medicineGroup?: MedicineGroup
|
||||
medicineMethod_code?: string
|
||||
medicineMethod?: MedicineMethod
|
||||
medicineForm_code?: string
|
||||
medicineForm?: MedicineFormData
|
||||
uom_code: string
|
||||
infra_id?: string | null
|
||||
stock: number
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { type Medicine, genMedicine } from "./medicine";
|
||||
|
||||
interface MedicinemixItem extends Base {
|
||||
export interface MedicinemixItem extends Base {
|
||||
id: number
|
||||
medicineMix_id: number
|
||||
medicine_id: number
|
||||
@@ -35,7 +35,7 @@ export interface DeleteDto {
|
||||
id: number
|
||||
}
|
||||
|
||||
export function MedicinemixItem(): MedicinemixItem {
|
||||
export function genMedicinemixItem(): MedicinemixItem {
|
||||
return {
|
||||
...genBase(),
|
||||
medicineMix_id: 0,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import type { Employee } from "./employee"
|
||||
|
||||
export interface Nurse extends Base {
|
||||
employee_id: number
|
||||
employee?: Employee
|
||||
ihs_number?: string
|
||||
unit_id: number
|
||||
infra_id: number
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { genDoctor, type Doctor } from "./doctor"
|
||||
import { genEncounter, type Encounter } from "./encounter"
|
||||
import { genSpecialist, type Specialist } from "./specialist"
|
||||
import { genSubspecialist, type Subspecialist } from "./subspecialist"
|
||||
import { genUnit, type Unit } from "./unit"
|
||||
|
||||
export interface Prb extends Base {
|
||||
encounter_id: number
|
||||
encounter: Encounter
|
||||
unit_id: number
|
||||
unit: Unit
|
||||
specialist_id: number
|
||||
specialist: Specialist
|
||||
subspecialist_id: number
|
||||
subspecialist: Subspecialist
|
||||
doctor_id: number
|
||||
doctor: Doctor
|
||||
date: ''
|
||||
}
|
||||
|
||||
export function genPrb(): Prb {
|
||||
return {
|
||||
...genBase(),
|
||||
encounter_id: 0,
|
||||
encounter: genEncounter(),
|
||||
unit_id: 0,
|
||||
unit: genUnit(),
|
||||
specialist_id: 0,
|
||||
specialist: genSpecialist(),
|
||||
subspecialist_id: 0,
|
||||
subspecialist: genSubspecialist(),
|
||||
doctor_id: 0,
|
||||
doctor: genDoctor(),
|
||||
date: ''
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ export interface PrescriptionItem {
|
||||
id: number;
|
||||
prescription_id: number;
|
||||
isMix: boolean;
|
||||
medicine_id: number;
|
||||
medicine: Medicine;
|
||||
medicineMix_id: number;
|
||||
medicineMix: Medicinemix
|
||||
medicine_code?: string;
|
||||
medicine?: Medicine;
|
||||
medicineMix_id?: number;
|
||||
medicineMix?: Medicinemix
|
||||
frequency: number;
|
||||
dose: number;
|
||||
interval: number;
|
||||
@@ -29,35 +29,35 @@ export interface CreateDto {
|
||||
quantity: number;
|
||||
usage: string;
|
||||
}
|
||||
|
||||
|
||||
export interface GetListDto {
|
||||
page: number
|
||||
size: number
|
||||
name?: string
|
||||
// code?: string
|
||||
}
|
||||
|
||||
|
||||
export interface GetDetailDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
|
||||
export interface UpdateDto extends CreateDto {
|
||||
id?: number
|
||||
}
|
||||
|
||||
|
||||
export interface DeleteDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export function genPresciptionItem(): PrescriptionItem {
|
||||
|
||||
export function genPrescriptionItem(): PrescriptionItem {
|
||||
return {
|
||||
id: 0,
|
||||
prescription_id: 0,
|
||||
isMix: false,
|
||||
medicine_id: 0,
|
||||
medicine: genMedicine(),
|
||||
medicineMix_id: 0,
|
||||
medicineMix: genMedicinemix(),
|
||||
// medicine_code: '',
|
||||
// medicine: genMedicine(),
|
||||
// medicineMix_id: 0,
|
||||
// medicineMix: genMedicinemix(),
|
||||
frequency: 0,
|
||||
dose: 0,
|
||||
interval: 0,
|
||||
@@ -66,4 +66,3 @@ export function genPresciptionItem(): PrescriptionItem {
|
||||
usage: ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { type Base, genBase } from "./_base";
|
||||
import { type Encounter, genEncounter } from "./encounter";
|
||||
import { type Doctor, genDoctor } from "./doctor";
|
||||
import { type PrescriptionItem } from "./prescription-item";
|
||||
import type { SpecialistIntern } from "./specialist-intern";
|
||||
|
||||
export interface Prescription {
|
||||
id: number
|
||||
export interface Prescription extends Base {
|
||||
encounter_id: number
|
||||
encounter: Encounter
|
||||
doctor_id: number
|
||||
@@ -44,7 +44,7 @@ export interface DeleteDto {
|
||||
|
||||
export function genPresciption(): Prescription {
|
||||
return {
|
||||
id: 0,
|
||||
...genBase(),
|
||||
encounter_id: 0,
|
||||
encounter: genEncounter(),
|
||||
doctor_id: 0,
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import { type Base, genBase } from "./_base";
|
||||
import { genMaterialPackage, type MaterialPackage } from "./material-package";
|
||||
import { genProcedureRoom, type ProcedureRoom } from "./procedure-room";
|
||||
|
||||
export interface ProcedureRoomOrderItem extends Base {
|
||||
procedureRoomOrder_id: number
|
||||
procedureRoom_code: string
|
||||
procedureRoom: ProcedureRoom
|
||||
}
|
||||
|
||||
export interface CreateDto {
|
||||
procedureRoomOrder_id: number
|
||||
procedureRoom_code: string
|
||||
}
|
||||
|
||||
export interface UpdateDto extends CreateDto {
|
||||
note?: string
|
||||
}
|
||||
|
||||
export function genProcedureRoomOrderItem(): ProcedureRoomOrderItem {
|
||||
return {
|
||||
...genBase(),
|
||||
procedureRoomOrder_id: 0,
|
||||
procedureRoom_code: '',
|
||||
procedureRoom: genProcedureRoom(),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { type Base, genBase } from "./_base";
|
||||
import { genMaterialPackage, type MaterialPackage } from "./material-package";
|
||||
import { genProcedureRoom, type ProcedureRoom } from "./procedure-room";
|
||||
|
||||
export interface ProcedureRoomOrder extends Base {
|
||||
encounter_id: number
|
||||
materialPackage_code?: string
|
||||
materialPackage: MaterialPackage
|
||||
items?: ProcedureRoom[]
|
||||
}
|
||||
|
||||
export interface CreateDto {
|
||||
encounter_id: number
|
||||
}
|
||||
|
||||
export function genProcedureRoomOrder(): ProcedureRoomOrder {
|
||||
return {
|
||||
...genBase(),
|
||||
encounter_id: 0,
|
||||
materialPackage_code: '',
|
||||
materialPackage: genMaterialPackage(),
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { type Base, genBase } from "./_base";
|
||||
import type { Infra } from "./infra";
|
||||
|
||||
export interface ProcedureRoom extends Base {
|
||||
code: string
|
||||
infra_code: string
|
||||
infra?: Infra
|
||||
type_code: string
|
||||
unit_code: string
|
||||
specialist_code?: string | null
|
||||
subspecialist_code?: string | null
|
||||
}
|
||||
|
||||
export function genProcedureRoom(): ProcedureRoom {
|
||||
return {
|
||||
...genBase(),
|
||||
code: '',
|
||||
infra_code: '',
|
||||
type_code: '',
|
||||
unit_code: '',
|
||||
specialist_code: null,
|
||||
subspecialist_code: null,
|
||||
}
|
||||
}
|
||||
+3
-5
@@ -1,5 +1,3 @@
|
||||
import type { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
||||
|
||||
export interface User {
|
||||
id: string
|
||||
name: string
|
||||
@@ -14,9 +12,9 @@ export interface AuthState {
|
||||
|
||||
export type Permission = 'C' | 'R' | 'U' | 'D'
|
||||
|
||||
export interface RoleAccess {
|
||||
export interface RoleAccesses {
|
||||
[role: string]: Permission[]
|
||||
}
|
||||
|
||||
export type PagePath = keyof typeof PAGE_PERMISSIONS
|
||||
export type PagePermission = (typeof PAGE_PERMISSIONS)[PagePath]
|
||||
// export type PagePath = keyof typeof PAGE_PERMISSIONS
|
||||
// export type PagePermission = (typeof PAGE_PERMISSIONS)[PagePath]
|
||||
|
||||
+173
-1
@@ -1,4 +1,4 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { type Base, genBase } from './_base'
|
||||
|
||||
export interface Soapi extends Base {
|
||||
encounter_id: number
|
||||
@@ -16,3 +16,175 @@ export function genSoapi(): Soapi {
|
||||
value: '',
|
||||
}
|
||||
}
|
||||
|
||||
export interface DiagnosisCode {
|
||||
code: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface AssessmentSection {
|
||||
note: string
|
||||
codes: DiagnosisCode[]
|
||||
}
|
||||
|
||||
export interface Subject {
|
||||
note: string
|
||||
'prim-compl': string
|
||||
'sec-compl': string
|
||||
'pri-complain': string
|
||||
'sec-complain': string
|
||||
'cur-disea-hist': string
|
||||
'pas-disea-hist': string
|
||||
'fam-disea-hist': string
|
||||
'alg-hist': string
|
||||
'alg-react': string
|
||||
'med-hist': string
|
||||
'blood-type': string
|
||||
}
|
||||
|
||||
export interface ObjectSection {
|
||||
note: string
|
||||
'consc-level': string
|
||||
'consc-level-det': string
|
||||
'syst-bp': string
|
||||
'diast-bp': string
|
||||
pulse: string
|
||||
'resp-rate': string
|
||||
'hear-rt': string
|
||||
'neuro-cranialis': string
|
||||
sensoris: string
|
||||
'reflect-fisio': string
|
||||
'reflect-pato': string
|
||||
'autonom-neuron': string
|
||||
'neck-rom': string
|
||||
'body-rom': string
|
||||
'aga-rom': string
|
||||
'agb-rom': string
|
||||
'neck-mmt': string
|
||||
'body-mmt': string
|
||||
'aga-mmt': string
|
||||
'agb-mmt': string
|
||||
localis: string
|
||||
'medical-trouble': string
|
||||
'rehab-medic-trouble': string
|
||||
temp: string
|
||||
spo2: string
|
||||
weight: string
|
||||
height: string
|
||||
'head-to-toe': Record<string, string>
|
||||
}
|
||||
|
||||
export interface Assessment {
|
||||
'early-diag': AssessmentSection
|
||||
'late-diag': AssessmentSection
|
||||
'sec-diag': AssessmentSection
|
||||
}
|
||||
|
||||
export interface InstructionCodeGroup {
|
||||
note: string
|
||||
codes: DiagnosisCode[]
|
||||
}
|
||||
|
||||
export interface Instruction {
|
||||
detail: string
|
||||
'medical-act': InstructionCodeGroup
|
||||
'supporting-exam': DiagnosisCode[]
|
||||
therapy: string
|
||||
medication: DiagnosisCode[]
|
||||
material: DiagnosisCode[]
|
||||
'rehab-program': string
|
||||
'physic-modal': string
|
||||
exercise: string
|
||||
'ortes-protesa': string
|
||||
education: string
|
||||
other: string
|
||||
}
|
||||
|
||||
export interface Soap extends Base {
|
||||
subject: Subject
|
||||
object: ObjectSection
|
||||
assessment: Assessment
|
||||
plan: string
|
||||
instruction: Instruction
|
||||
}
|
||||
|
||||
// ---- Generators ----
|
||||
|
||||
function genDiagnosisCode(): DiagnosisCode {
|
||||
return { code: '', name: '' }
|
||||
}
|
||||
|
||||
function genAssessmentSection(): AssessmentSection {
|
||||
return { note: '', codes: [genDiagnosisCode()] }
|
||||
}
|
||||
|
||||
export function genSoap(): Soap {
|
||||
return {
|
||||
...genBase(),
|
||||
subject: {
|
||||
note: '',
|
||||
'prim-compl': '',
|
||||
'sec-compl': '',
|
||||
'pri-complain': '',
|
||||
'sec-complain': '',
|
||||
'cur-disea-hist': '',
|
||||
'pas-disea-hist': '',
|
||||
'fam-disea-hist': '',
|
||||
'alg-hist': '',
|
||||
'alg-react': '',
|
||||
'med-hist': '',
|
||||
'blood-type': '',
|
||||
},
|
||||
object: {
|
||||
note: '',
|
||||
'consc-level': '',
|
||||
'consc-level-det': '',
|
||||
'syst-bp': '',
|
||||
'diast-bp': '',
|
||||
pulse: '',
|
||||
'resp-rate': '',
|
||||
'hear-rt': '',
|
||||
'neuro-cranialis': '',
|
||||
sensoris: '',
|
||||
'reflect-fisio': '',
|
||||
'reflect-pato': '',
|
||||
'autonom-neuron': '',
|
||||
'neck-rom': '',
|
||||
'body-rom': '',
|
||||
'aga-rom': '',
|
||||
'agb-rom': '',
|
||||
'neck-mmt': '',
|
||||
'body-mmt': '',
|
||||
'aga-mmt': '',
|
||||
'agb-mmt': '',
|
||||
localis: '',
|
||||
'medical-trouble': '',
|
||||
'rehab-medic-trouble': '',
|
||||
temp: '',
|
||||
spo2: '',
|
||||
weight: '',
|
||||
height: '',
|
||||
'head-to-toe': {},
|
||||
},
|
||||
assessment: {
|
||||
'early-diag': genAssessmentSection(),
|
||||
'late-diag': genAssessmentSection(),
|
||||
'sec-diag': genAssessmentSection(),
|
||||
},
|
||||
plan: '',
|
||||
instruction: {
|
||||
detail: '',
|
||||
'medical-act': { note: '', codes: [genDiagnosisCode()] },
|
||||
'supporting-exam': [genDiagnosisCode()],
|
||||
therapy: '',
|
||||
medication: [genDiagnosisCode()],
|
||||
material: [genDiagnosisCode()],
|
||||
'rehab-program': '',
|
||||
'physic-modal': '',
|
||||
exercise: '',
|
||||
'ortes-protesa': '',
|
||||
education: '',
|
||||
other: '',
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import { type Base, genBase } from './_base'
|
||||
import type { Employee } from './employee'
|
||||
|
||||
export interface SpecialistPosition extends Base {
|
||||
specialist_id: string
|
||||
code: string
|
||||
name: string
|
||||
headStatus?: boolean
|
||||
employee_id?: number
|
||||
employee?: Employee | null
|
||||
}
|
||||
|
||||
export function genSpecialistPosition(): SpecialistPosition {
|
||||
return {
|
||||
...genBase(),
|
||||
specialist_id: '',
|
||||
code: '',
|
||||
name: '',
|
||||
headStatus: false,
|
||||
employee_id: 0,
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { type Base, genBase } from './_base'
|
||||
import type { Unit } from './unit'
|
||||
import type { Subspecialist } from "./subspecialist"
|
||||
|
||||
export interface Specialist extends Base {
|
||||
code: string
|
||||
name: string
|
||||
unit_id?: number | string | null
|
||||
unit?: Unit | null
|
||||
subspecialists?: Subspecialist[]
|
||||
}
|
||||
|
||||
export function genSpecialist(): Specialist {
|
||||
@@ -11,6 +14,6 @@ export function genSpecialist(): Specialist {
|
||||
...genBase(),
|
||||
code: '',
|
||||
name: '',
|
||||
unit_id: 0
|
||||
unit_id: '',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import { type Base, genBase } from './_base'
|
||||
import type { Employee } from './employee'
|
||||
import type { Subspecialist } from './subspecialist'
|
||||
|
||||
export interface SubSpecialistPosition extends Base {
|
||||
subspecialist_id: string
|
||||
code: string
|
||||
name: string
|
||||
headStatus?: boolean
|
||||
employee_id?: number
|
||||
|
||||
subspecialist?: Subspecialist | null
|
||||
employee?: Employee | null
|
||||
}
|
||||
|
||||
export function genSubSpecialistPosition(): SubSpecialistPosition {
|
||||
return {
|
||||
...genBase(),
|
||||
subspecialist_id: '',
|
||||
code: '',
|
||||
name: '',
|
||||
headStatus: false,
|
||||
employee_id: 0,
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
import { type Base, genBase } from './_base'
|
||||
import { type Specialist } from './specialist'
|
||||
export interface Subspecialist extends Base {
|
||||
code: string
|
||||
name: string
|
||||
specialist_id?: number | string | null
|
||||
|
||||
specialist?: Specialist | null
|
||||
}
|
||||
|
||||
export function genSubspecialist(): Subspecialist {
|
||||
@@ -11,6 +13,6 @@ export function genSubspecialist(): Subspecialist {
|
||||
...genBase(),
|
||||
code: '',
|
||||
name: '',
|
||||
specialist_id: 0
|
||||
specialist_id: 0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { genDoctor, type Doctor } from "./doctor"
|
||||
import { genEncounter, type Encounter } from "./encounter"
|
||||
import { genSpecialist, type Specialist } from "./specialist"
|
||||
import { genSubspecialist, type Subspecialist } from "./subspecialist"
|
||||
import { genUnit, type Unit } from "./unit"
|
||||
|
||||
export interface SurgeryReport extends Base {
|
||||
encounter_id: number
|
||||
encounter: Encounter
|
||||
unit_id: number
|
||||
unit: Unit
|
||||
specialist_id: number
|
||||
specialist: Specialist
|
||||
subspecialist_id: number
|
||||
subspecialist: Subspecialist
|
||||
doctor_id: number
|
||||
doctor: Doctor
|
||||
date: ''
|
||||
}
|
||||
|
||||
export function genSurgeryReport(): SurgeryReport {
|
||||
return {
|
||||
...genBase(),
|
||||
encounter_id: 0,
|
||||
encounter: genEncounter(),
|
||||
unit_id: 0,
|
||||
unit: genUnit(),
|
||||
specialist_id: 0,
|
||||
specialist: genSpecialist(),
|
||||
subspecialist_id: 0,
|
||||
subspecialist: genSubspecialist(),
|
||||
doctor_id: 0,
|
||||
doctor: genDoctor(),
|
||||
date: ''
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { type Base, genBase } from './_base'
|
||||
import type { Employee } from './employee'
|
||||
|
||||
export interface UnitPosition extends Base {
|
||||
unit_id: string
|
||||
code: string
|
||||
name: string
|
||||
headStatus?: boolean
|
||||
employee_id?: number
|
||||
|
||||
employee?: Employee | null
|
||||
}
|
||||
|
||||
export function genUnitPosition(): UnitPosition {
|
||||
return {
|
||||
...genBase(),
|
||||
unit_id: '',
|
||||
code: '',
|
||||
name: '',
|
||||
headStatus: false,
|
||||
employee_id: 0,
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -1,9 +1,11 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
|
||||
import { type Base, genBase } from './_base'
|
||||
import { type Installation } from '~/models/installation'
|
||||
export interface Unit extends Base {
|
||||
code: string
|
||||
name: string
|
||||
installation_id?: number | string | null
|
||||
|
||||
installation?: Installation | null
|
||||
}
|
||||
|
||||
export function genUnit(): Unit {
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import { type Base, genBase } from "./_base"
|
||||
import { genDoctor, type Doctor } from "./doctor"
|
||||
import { genEncounter, type Encounter } from "./encounter"
|
||||
import { genSpecialist, type Specialist } from "./specialist"
|
||||
import { genSubspecialist, type Subspecialist } from "./subspecialist"
|
||||
import { genUnit, type Unit } from "./unit"
|
||||
|
||||
export interface VaccineData extends Base {
|
||||
encounter_id: number
|
||||
encounter: Encounter
|
||||
unit_id: number
|
||||
unit: Unit
|
||||
specialist_id: number
|
||||
specialist: Specialist
|
||||
subspecialist_id: number
|
||||
subspecialist: Subspecialist
|
||||
doctor_id: number
|
||||
doctor: Doctor
|
||||
date: ''
|
||||
}
|
||||
|
||||
export function genVaccineData(): VaccineData {
|
||||
return {
|
||||
...genBase(),
|
||||
encounter_id: 0,
|
||||
encounter: genEncounter(),
|
||||
unit_id: 0,
|
||||
unit: genUnit(),
|
||||
specialist_id: 0,
|
||||
specialist: genSpecialist(),
|
||||
subspecialist_id: 0,
|
||||
subspecialist: genSubspecialist(),
|
||||
doctor_id: 0,
|
||||
doctor: genDoctor(),
|
||||
date: ''
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface VclaimSepData {
|
||||
letterDate: string
|
||||
letterNumber: string
|
||||
serviceType: string
|
||||
flow: string
|
||||
medicalRecordNumber: string
|
||||
patientName: string
|
||||
cardNumber: string
|
||||
controlLetterNumber: string
|
||||
controlLetterDate: string
|
||||
clinicDestination: string
|
||||
attendingDoctor: string
|
||||
diagnosis: string
|
||||
careClass: string
|
||||
}
|
||||
Reference in New Issue
Block a user