Merge branch 'main' of https://git.shiblysolution.id/SAUDE-TL/entity
This commit is contained in:
29
src/entity/counter.ts
Normal file
29
src/entity/counter.ts
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
|
||||||
|
@Entity("counter")
|
||||||
|
export class Counter {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 128,
|
||||||
|
unique: true,
|
||||||
|
type: "varchar",
|
||||||
|
})
|
||||||
|
key: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
type: "bigint",
|
||||||
|
})
|
||||||
|
value: string;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
}
|
||||||
@ -21,10 +21,10 @@ export class EmrPatient {
|
|||||||
@Column({ nullable: true, length: 64 })
|
@Column({ nullable: true, length: 64 })
|
||||||
passport_number: string;
|
passport_number: string;
|
||||||
|
|
||||||
@Column({ nullable: false, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
first_name: string;
|
first_name: string;
|
||||||
|
|
||||||
@Column({ nullable: false, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
last_name: string;
|
last_name: string;
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
|
|||||||
@ -1,15 +1,4 @@
|
|||||||
import {
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn, OneToOne, ManyToMany } from "typeorm";
|
||||||
Entity,
|
|
||||||
PrimaryGeneratedColumn,
|
|
||||||
Column,
|
|
||||||
CreateDateColumn,
|
|
||||||
UpdateDateColumn,
|
|
||||||
DeleteDateColumn,
|
|
||||||
ManyToOne,
|
|
||||||
JoinColumn,
|
|
||||||
OneToOne,
|
|
||||||
ManyToMany
|
|
||||||
} from "typeorm";
|
|
||||||
|
|
||||||
import { RegistrationType } from "../../types/registration_type";
|
import { RegistrationType } from "../../types/registration_type";
|
||||||
import { RegistrationStatus } from "../../types/registration_status";
|
import { RegistrationStatus } from "../../types/registration_status";
|
||||||
@ -18,6 +7,7 @@ import { PatientGuarantor } from "../patient_guarantor";
|
|||||||
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
import { EmrRegistrationOutpatient } from "./emr_registration_outpatient";
|
||||||
import { EmrRegistrationEmergency } from "./emr_registration_emergency";
|
import { EmrRegistrationEmergency } from "./emr_registration_emergency";
|
||||||
import { EmrRegistrationEmergencyResponsible } from "./emr_registration_emergency_responsible";
|
import { EmrRegistrationEmergencyResponsible } from "./emr_registration_emergency_responsible";
|
||||||
|
import { RefferalHospital } from "../refferal_hospital";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registrasi base: data umum untuk semua tipe (rawat jalan, rawat inap, emergency, hemodialysis).
|
* Registrasi base: data umum untuk semua tipe (rawat jalan, rawat inap, emergency, hemodialysis).
|
||||||
@ -77,6 +67,13 @@ export class EmrRegistration {
|
|||||||
@Column({ nullable: true, type: "text" })
|
@Column({ nullable: true, type: "text" })
|
||||||
idcard: string;
|
idcard: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => RefferalHospital, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn({ name: "referral_hospital_id" })
|
||||||
|
referral_hospital: RefferalHospital;
|
||||||
|
|
||||||
|
@Column({ nullable: true, type: "text" })
|
||||||
|
patient_category: string;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -51,4 +51,5 @@ export * from "../types/pharmacy_order_status";
|
|||||||
export * from "../types/prescription_pharmacy_status";
|
export * from "../types/prescription_pharmacy_status";
|
||||||
export * from "../types/radiology_order_status";
|
export * from "../types/radiology_order_status";
|
||||||
export * from "../types/laboratory_order_status";
|
export * from "../types/laboratory_order_status";
|
||||||
export * from "../enum/consciousness"
|
export * from "../enum/consciousness";
|
||||||
|
export * from "../types/patient_category";
|
||||||
|
|||||||
@ -54,6 +54,7 @@ export * from "../entity/ward";
|
|||||||
export * from "../entity/responsible_party_consent";
|
export * from "../entity/responsible_party_consent";
|
||||||
export * from "../entity/foster_care_history";
|
export * from "../entity/foster_care_history";
|
||||||
export * from "../entity/notification";
|
export * from "../entity/notification";
|
||||||
|
export * from "../entity/counter";
|
||||||
|
|
||||||
export * from "../types/public";
|
export * from "../types/public";
|
||||||
export * from "../types/action";
|
export * from "../types/action";
|
||||||
|
|||||||
11
src/types/patient_category.ts
Normal file
11
src/types/patient_category.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* Workflow kategori pendaftaran pasien.
|
||||||
|
* Existing: pasien sudah lama daftar
|
||||||
|
* New: pasien baru dari pendaftaran pasien
|
||||||
|
* Foreigner: pasien asing
|
||||||
|
*/
|
||||||
|
export enum PatientCategory {
|
||||||
|
EXISTING = "existing",
|
||||||
|
NEW = "new",
|
||||||
|
FOREIGNER = "foreigner",
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user