fe-prescription-56: wip
This commit is contained in:
No files matched your search
@@ -2,8 +2,8 @@
|
||||
export interface ItemMeta {
|
||||
id: number
|
||||
createdAt: string | null
|
||||
deletedAt: string | null
|
||||
updatedAt: string | null
|
||||
deletedAt?: string | null
|
||||
}
|
||||
|
||||
// Pagination meta model for API responses
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export interface Device {
|
||||
import type { ItemMeta } from "./_model"
|
||||
|
||||
export interface Device extends ItemMeta {
|
||||
code: string
|
||||
name: string
|
||||
uom_code: string
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { ItemMeta } from "./_model"
|
||||
|
||||
export interface DivisionPosition extends ItemMeta {
|
||||
code: string
|
||||
name: string
|
||||
division_id: number
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
export interface Division {
|
||||
id?: number
|
||||
import type { ItemMeta } from "./_model"
|
||||
|
||||
export interface Division extends ItemMeta {
|
||||
code: string
|
||||
name: string
|
||||
parent_id?: number | null
|
||||
childrens?: Division[] | null
|
||||
}
|
||||
|
||||
export interface DivisionPosition {
|
||||
export interface DivisionPosition extends ItemMeta {
|
||||
code: string
|
||||
name: string
|
||||
division_id: number
|
||||
|
||||
+16
-16
@@ -1,18 +1,17 @@
|
||||
export interface Doctor {
|
||||
id: number
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
name: string
|
||||
frontTitle?: string
|
||||
endTitle?: string
|
||||
specialist_code?: string
|
||||
sip_no: string
|
||||
import type { ItemMeta } from "./_model"
|
||||
import { genEmployee, type Employee } from "./employee"
|
||||
|
||||
export interface Doctor extends ItemMeta {
|
||||
employee_id: number
|
||||
employee: Employee
|
||||
ihs_number: string
|
||||
identity_number: string
|
||||
phone?: string
|
||||
bpjs_code?: string
|
||||
status_code?: number
|
||||
sip_number: string
|
||||
unit_id?: number
|
||||
specialist_id?: number
|
||||
subspecialist_id?: number
|
||||
bpjs_code: string
|
||||
}
|
||||
|
||||
// use one dto for both create and update
|
||||
export interface CreateDto {
|
||||
name?: string
|
||||
@@ -53,9 +52,10 @@ export function genDoctor(): Doctor {
|
||||
id: 0,
|
||||
createdAt: '',
|
||||
updatedAt: '',
|
||||
name: '',
|
||||
employee_id: 0,
|
||||
employee: genEmployee(),
|
||||
ihs_number: '',
|
||||
identity_number: '',
|
||||
sip_no: '',
|
||||
sip_number: '',
|
||||
bpjs_code: '',
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
import { type Person, genPerson } from "./person"
|
||||
|
||||
export interface Employee {
|
||||
name: string
|
||||
number: string
|
||||
status_code: string
|
||||
user_id: number
|
||||
person_id: number
|
||||
person: Person
|
||||
position_code: string
|
||||
division_code: string
|
||||
number: string
|
||||
status_code: string
|
||||
}
|
||||
|
||||
export interface CreateDto extends Employee {}
|
||||
@@ -26,12 +28,12 @@ export interface GetListDto extends Employee {
|
||||
|
||||
export function genEmployee(): Employee {
|
||||
return {
|
||||
name: '',
|
||||
number: '',
|
||||
status_code: '',
|
||||
user_id: 0,
|
||||
person_id: 0,
|
||||
person: genPerson(),
|
||||
position_code: '',
|
||||
division_code: '',
|
||||
number: '',
|
||||
status_code: '',
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import { type Doctor, genDoctor } from "./doctor"
|
||||
|
||||
export interface Encounter {
|
||||
id: number
|
||||
patient_id: number
|
||||
registeredAt: string
|
||||
class_code: string
|
||||
unit_id: number
|
||||
specialist_id?: number
|
||||
subspecialist_id?: number
|
||||
visitdate: string
|
||||
appointment_doctor_id: number
|
||||
appointment_doctor: Doctor
|
||||
responsible_doctor_id?: number
|
||||
responsible_doctor?: Doctor
|
||||
refSource_name?: string
|
||||
appointment_id?: number
|
||||
earlyEducation?: string
|
||||
medicalDischargeEducation: string
|
||||
admDischargeEducation?: string
|
||||
dischargeMethod_code?: string
|
||||
discharge_reason?: string
|
||||
status_code: string
|
||||
}
|
||||
|
||||
export function genEncounter(): Encounter {
|
||||
return {
|
||||
id: 0,
|
||||
patient_id: 0,
|
||||
registeredAt: '',
|
||||
class_code: '',
|
||||
unit_id: 0,
|
||||
visitdate: '',
|
||||
appointment_doctor_id: 0,
|
||||
appointment_doctor: genDoctor(),
|
||||
medicalDischargeEducation: '',
|
||||
status_code: ''
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { ItemMeta } from '~/models/_model'
|
||||
|
||||
export interface Person extends ItemMeta {
|
||||
id: number
|
||||
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
|
||||
residentIdentityFileUrl?: string
|
||||
passportFileUrl?: string
|
||||
drivingLicenseFileUrl?: string
|
||||
familyIdentityFileUrl?: string
|
||||
}
|
||||
|
||||
export function genPerson(): Person {
|
||||
return {
|
||||
id: 0,
|
||||
createdAt: '',
|
||||
updatedAt: '',
|
||||
name: '',
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { genMedicine, type Medicine } from "./medicine";
|
||||
import { genMedicinemix, type Medicinemix } from "./medicinemix";
|
||||
|
||||
interface PrescriptionItem {
|
||||
export interface PrescriptionItem {
|
||||
id: number;
|
||||
prescription_id: number;
|
||||
isMix: boolean;
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
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
|
||||
encounter_id: number
|
||||
encounter: Encounter
|
||||
doctor_id: number
|
||||
doctor: Doctor
|
||||
specialistIntern_id?: number
|
||||
specialistIntern?: SpecialistIntern
|
||||
issuedAt: string
|
||||
status_code: string
|
||||
items: PrescriptionItem[]
|
||||
}
|
||||
|
||||
export interface CreateDto {
|
||||
encounter_id: number
|
||||
doctor_id: number
|
||||
issuedAt: string
|
||||
status_code: string
|
||||
}
|
||||
|
||||
export interface GetListDto {
|
||||
encounter_id: number
|
||||
doctor_id: number
|
||||
issuedAt: string
|
||||
status_code: string
|
||||
}
|
||||
|
||||
export interface GetDetailDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export interface UpdateDto extends CreateDto {
|
||||
id?: number
|
||||
}
|
||||
|
||||
export interface DeleteDto {
|
||||
id?: string
|
||||
}
|
||||
|
||||
export function genPresciption(): Prescription {
|
||||
return {
|
||||
id: 0,
|
||||
encounter_id: 0,
|
||||
encounter: genEncounter(),
|
||||
doctor_id: 0,
|
||||
doctor: genDoctor(),
|
||||
issuedAt: '',
|
||||
status_code: '',
|
||||
items: [],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import type { ItemMeta } from "./_model";
|
||||
import { type Person, genPerson } from "./person";
|
||||
import { type Specialist, genSpecialist } from "./specialist";
|
||||
import { type Subspecialist, genSubspecialist } from "./subspecialist";
|
||||
|
||||
export interface SpecialistIntern extends ItemMeta {
|
||||
person_id: number
|
||||
person: Person
|
||||
specialist_id: number
|
||||
specialist: Specialist
|
||||
subspecialist_id: number
|
||||
subspecialist: Subspecialist
|
||||
user_id: number
|
||||
}
|
||||
|
||||
export function genSpecialistIntern(): SpecialistIntern {
|
||||
return {
|
||||
id: 0,
|
||||
createdAt: '',
|
||||
updatedAt: '',
|
||||
person_id: 0,
|
||||
person: genPerson(),
|
||||
specialist_id: 0,
|
||||
specialist: genSpecialist(),
|
||||
subspecialist_id: 0,
|
||||
subspecialist: genSubspecialist(),
|
||||
user_id: 0,
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,18 @@
|
||||
export interface Specialist {
|
||||
id?: number
|
||||
import type { ItemMeta } from "./_model"
|
||||
|
||||
export interface Specialist extends ItemMeta {
|
||||
code: string
|
||||
name: string
|
||||
unit_id: number | string
|
||||
}
|
||||
|
||||
export function genSpecialist(): Specialist {
|
||||
return {
|
||||
id: 0,
|
||||
createdAt: '',
|
||||
updatedAt: '',
|
||||
code: '',
|
||||
name: '',
|
||||
unit_id: 0
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,18 @@
|
||||
export interface Subspecialist {
|
||||
id?: number
|
||||
import type { ItemMeta } from "./_model"
|
||||
|
||||
export interface Subspecialist extends ItemMeta {
|
||||
code: string
|
||||
name: string
|
||||
specialist_id: number | string
|
||||
}
|
||||
|
||||
export function genSubspecialist(): Subspecialist {
|
||||
return {
|
||||
id: 0,
|
||||
createdAt: '',
|
||||
updatedAt: '',
|
||||
code: '',
|
||||
name: '',
|
||||
specialist_id: 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user