Merge branch 'main' of https://git.shiblysolution.id/SAUDE-TL/entity
This commit is contained in:
60
src/entity/reporting/emergency_case_category_fact.ts
Normal file
60
src/entity/reporting/emergency_case_category_fact.ts
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
Index,
|
||||||
|
} from "typeorm";
|
||||||
|
import { OpdReportGrain } from "../../types/opd_report_grain";
|
||||||
|
|
||||||
|
export enum EmergencyCaseCategory {
|
||||||
|
SUICIDE = "suicide",
|
||||||
|
HOMICIDE = "homicide",
|
||||||
|
}
|
||||||
|
|
||||||
|
@Entity({ schema: "reporting", name: "emergency_case_category_fact" })
|
||||||
|
@Index(["grain", "period_start", "period_end", "case_category"], {
|
||||||
|
unique: true,
|
||||||
|
})
|
||||||
|
export class EmergencyCaseCategoryFact {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "enum",
|
||||||
|
enum: OpdReportGrain,
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
grain: OpdReportGrain;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_start: string;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_end: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "enum",
|
||||||
|
enum: EmergencyCaseCategory,
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
case_category: EmergencyCaseCategory;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
male_cases: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
female_cases: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
total_cases: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
}
|
||||||
63
src/entity/reporting/emergency_consultation_type_fact.ts
Normal file
63
src/entity/reporting/emergency_consultation_type_fact.ts
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
Index,
|
||||||
|
} from "typeorm";
|
||||||
|
import { OpdReportGrain } from "../../types/opd_report_grain";
|
||||||
|
|
||||||
|
@Entity({ schema: "reporting", name: "emergency_consultation_type_fact" })
|
||||||
|
@Index(["grain", "period_start", "period_end", "consultation_type"], {
|
||||||
|
unique: true,
|
||||||
|
})
|
||||||
|
export class EmergencyConsultationTypeFact {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "enum",
|
||||||
|
enum: OpdReportGrain,
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
grain: OpdReportGrain;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_start: string;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_end: string;
|
||||||
|
|
||||||
|
@Column({ nullable: false, length: 256 })
|
||||||
|
consultation_type: string;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
observation: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
admitted: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
discharged: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
dead: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
dba: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
total_patients: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
rank: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
}
|
||||||
48
src/entity/reporting/emergency_domestic_violence_fact.ts
Normal file
48
src/entity/reporting/emergency_domestic_violence_fact.ts
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
Index,
|
||||||
|
} from "typeorm";
|
||||||
|
import { OpdReportGrain } from "../../types/opd_report_grain";
|
||||||
|
|
||||||
|
@Entity({ schema: "reporting", name: "emergency_domestic_violence_fact" })
|
||||||
|
@Index(["grain", "period_start", "period_end", "violence_type"], {
|
||||||
|
unique: true,
|
||||||
|
})
|
||||||
|
export class EmergencyDomesticViolenceFact {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "enum",
|
||||||
|
enum: OpdReportGrain,
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
grain: OpdReportGrain;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_start: string;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_end: string;
|
||||||
|
|
||||||
|
@Column({ nullable: false, length: 256 })
|
||||||
|
violence_type: string;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
total_cases: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
rank: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
}
|
||||||
54
src/entity/reporting/emergency_drowning_intoxication_fact.ts
Normal file
54
src/entity/reporting/emergency_drowning_intoxication_fact.ts
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
Index,
|
||||||
|
} from "typeorm";
|
||||||
|
import { OpdReportGrain } from "../../types/opd_report_grain";
|
||||||
|
|
||||||
|
@Entity({ schema: "reporting", name: "emergency_drowning_intoxication_fact" })
|
||||||
|
@Index(["grain", "period_start", "period_end", "case_type"], {
|
||||||
|
unique: true,
|
||||||
|
})
|
||||||
|
export class EmergencyDrowningIntoxicationFact {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "enum",
|
||||||
|
enum: OpdReportGrain,
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
grain: OpdReportGrain;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_start: string;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_end: string;
|
||||||
|
|
||||||
|
@Column({ nullable: false, length: 256 })
|
||||||
|
case_type: string;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
male_cases: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
female_cases: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
total_cases: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
rank: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
}
|
||||||
54
src/entity/reporting/emergency_traffic_accident_fact.ts
Normal file
54
src/entity/reporting/emergency_traffic_accident_fact.ts
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
Index,
|
||||||
|
} from "typeorm";
|
||||||
|
import { OpdReportGrain } from "../../types/opd_report_grain";
|
||||||
|
|
||||||
|
@Entity({ schema: "reporting", name: "emergency_traffic_accident_fact" })
|
||||||
|
@Index(["grain", "period_start", "period_end", "accident_type"], {
|
||||||
|
unique: true,
|
||||||
|
})
|
||||||
|
export class EmergencyTrafficAccidentFact {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: "enum",
|
||||||
|
enum: OpdReportGrain,
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
grain: OpdReportGrain;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_start: string;
|
||||||
|
|
||||||
|
@Column({ type: "date", nullable: false })
|
||||||
|
period_end: string;
|
||||||
|
|
||||||
|
@Column({ nullable: false, length: 256 })
|
||||||
|
accident_type: string;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
total_cases: number;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: true })
|
||||||
|
male_cases: number | null;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: true })
|
||||||
|
female_cases: number | null;
|
||||||
|
|
||||||
|
@Column({ type: "int", nullable: false, default: 0 })
|
||||||
|
rank: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
}
|
||||||
@ -9,3 +9,8 @@ export * from "../entity/reporting/emergency_outcome_fact";
|
|||||||
export * from "../entity/reporting/emergency_referral_source_fact";
|
export * from "../entity/reporting/emergency_referral_source_fact";
|
||||||
export * from "../entity/reporting/emergency_referral_name_fact";
|
export * from "../entity/reporting/emergency_referral_name_fact";
|
||||||
export * from "../entity/reporting/emergency_diagnosis_fact";
|
export * from "../entity/reporting/emergency_diagnosis_fact";
|
||||||
|
export * from "../entity/reporting/emergency_consultation_type_fact";
|
||||||
|
export * from "../entity/reporting/emergency_traffic_accident_fact";
|
||||||
|
export * from "../entity/reporting/emergency_domestic_violence_fact";
|
||||||
|
export * from "../entity/reporting/emergency_case_category_fact";
|
||||||
|
export * from "../entity/reporting/emergency_drowning_intoxication_fact";
|
||||||
|
|||||||
Reference in New Issue
Block a user