card management
This commit is contained in:
@ -11,9 +11,8 @@ import {
|
|||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { Munisipo } from "../munisipo";
|
import { Munisipo } from "../munisipo";
|
||||||
import { Administrativu } from "../administrativu";
|
import { Administrativu } from "../administrativu";
|
||||||
import { HealthcareFacilityStatus } from "../../types/healthcare_facility_status";
|
|
||||||
import { HealthcareFacilityType } from "../../types/healthcare_facility_type";
|
|
||||||
|
|
||||||
|
/** Minimal cache — synced from external master; no local type/status enums */
|
||||||
@Entity({ schema: "card_management", name: "healthcare_facility" })
|
@Entity({ schema: "card_management", name: "healthcare_facility" })
|
||||||
@Index(["code"], { unique: true })
|
@Index(["code"], { unique: true })
|
||||||
export class HealthcareFacility {
|
export class HealthcareFacility {
|
||||||
@ -26,14 +25,6 @@ export class HealthcareFacility {
|
|||||||
@Column({ type: "text", nullable: false })
|
@Column({ type: "text", nullable: false })
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "enum",
|
|
||||||
enum: HealthcareFacilityType,
|
|
||||||
nullable: false,
|
|
||||||
default: HealthcareFacilityType.HOSPITAL,
|
|
||||||
})
|
|
||||||
type: HealthcareFacilityType;
|
|
||||||
|
|
||||||
@ManyToOne(() => Munisipo, { onDelete: "NO ACTION", nullable: true })
|
@ManyToOne(() => Munisipo, { onDelete: "NO ACTION", nullable: true })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
municipio: Munisipo;
|
municipio: Munisipo;
|
||||||
@ -42,14 +33,6 @@ export class HealthcareFacility {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
administrativu: Administrativu;
|
administrativu: Administrativu;
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "enum",
|
|
||||||
enum: HealthcareFacilityStatus,
|
|
||||||
nullable: false,
|
|
||||||
default: HealthcareFacilityStatus.ACTIVE,
|
|
||||||
})
|
|
||||||
status: HealthcareFacilityStatus;
|
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -54,6 +54,18 @@ export class CardPrintQueue {
|
|||||||
@Column({ type: "text", nullable: true })
|
@Column({ type: "text", nullable: true })
|
||||||
facility_code?: string;
|
facility_code?: string;
|
||||||
|
|
||||||
|
@Column({ type: "bigint", nullable: true })
|
||||||
|
running_number?: string;
|
||||||
|
|
||||||
|
@Column({ type: "text", nullable: true })
|
||||||
|
card_number?: string;
|
||||||
|
|
||||||
|
@Column({ type: "text", nullable: true })
|
||||||
|
provision_job_id?: string;
|
||||||
|
|
||||||
|
@Column({ type: "text", nullable: true })
|
||||||
|
error_message?: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
type: "enum",
|
type: "enum",
|
||||||
enum: CardPrintQueueStatus,
|
enum: CardPrintQueueStatus,
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
export * from "../types/card_inventory_status";
|
export * from "../types/card_inventory_status";
|
||||||
export * from "../types/healthcare_facility_status";
|
|
||||||
export * from "../types/healthcare_facility_type";
|
|
||||||
export * from "../entity/card-management/card_inventory";
|
export * from "../entity/card-management/card_inventory";
|
||||||
export * from "../entity/card-management/healthcare_facility";
|
export * from "../entity/card-management/healthcare_facility";
|
||||||
export * from "../entity/card-management/running_number_log";
|
export * from "../entity/card-management/running_number_log";
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
export enum HealthcareFacilityStatus {
|
|
||||||
ACTIVE = "ACTIVE",
|
|
||||||
INACTIVE = "INACTIVE",
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
export enum HealthcareFacilityType {
|
|
||||||
HOSPITAL = "HOSPITAL",
|
|
||||||
CLINIC = "CLINIC",
|
|
||||||
HEALTH_CENTER = "HEALTH_CENTER",
|
|
||||||
OTHER = "OTHER",
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user