From 71ddd378286dd88af94ab52afdd50ecb991008ac Mon Sep 17 00:00:00 2001 From: avicenan Date: Tue, 16 Jun 2026 15:01:04 +0900 Subject: [PATCH] feat(referral_hospital): add new column of type --- src/entity/refferal_hospital.ts | 8 ++++++++ src/schema/public.ts | 2 +- src/types/referral_hospital_type.ts | 9 +++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/types/referral_hospital_type.ts diff --git a/src/entity/refferal_hospital.ts b/src/entity/refferal_hospital.ts index 989f9aa..c4e58ab 100644 --- a/src/entity/refferal_hospital.ts +++ b/src/entity/refferal_hospital.ts @@ -6,6 +6,7 @@ import { UpdateDateColumn, DeleteDateColumn, } from "typeorm"; +import { RefferalHospitalType } from "../types/referral_hospital_type"; @Entity("refferal_hospital") export class RefferalHospital { @@ -18,6 +19,13 @@ export class RefferalHospital { @Column({ type: "text", nullable: false }) refferal_hospital_name!: string; + @Column({ + type: "enum", + enum: RefferalHospitalType, + nullable: true, + }) + type?: RefferalHospitalType; + // Tanggal pembuatan grup pasien @CreateDateColumn() created_at!: Date; diff --git a/src/schema/public.ts b/src/schema/public.ts index c6896d1..9ece77f 100644 --- a/src/schema/public.ts +++ b/src/schema/public.ts @@ -75,4 +75,4 @@ export * from "../types/diagnosis_type"; export * from "../types/notification_priority"; export * from "../types/card_print_queue_status"; export * from "../types/card_print_queue_type"; - +export * from "../types/referral_hospital_type"; diff --git a/src/types/referral_hospital_type.ts b/src/types/referral_hospital_type.ts new file mode 100644 index 0000000..e23a41c --- /dev/null +++ b/src/types/referral_hospital_type.ts @@ -0,0 +1,9 @@ +/** + * Type of referral hospital. + */ +export enum RefferalHospitalType { + PRIVATE_CLINIC = "private_clinic", + PRIVATE_DOCTOR = "private_doctor", + CENTRO_SAUDE = "centro_saude", + HOSPITAL_REFERRAL = "hospital_referral", +} \ No newline at end of file