diff --git a/src/entity/foster_care_history.ts b/src/entity/foster_care_history.ts index 18e0f66..fc5f017 100644 --- a/src/entity/foster_care_history.ts +++ b/src/entity/foster_care_history.ts @@ -2,29 +2,145 @@ import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateCol import { Status } from "../types/status"; +interface ResultsCriteria { + group: number; + name: string; +} + +interface Causes { + group: string; + name: string; +} + +interface RelatedClinicalCondition { + name: string; +} + + @Entity("foster_care_history") export class FosterCareHistory { @PrimaryGeneratedColumn("uuid") id: string; @Column({ - nullable: false, + nullable: true, length: 256, }) diagnosis: string; @Column({ - nullable: false, + nullable: true, length: 128, }) code: string; @Column({ - nullable: false, + nullable: true, length: 64, }) status: Status; + @Column({ + nullable: true, + length: 128, + }) + category: string; + + @Column({ + nullable: true, + length: 128, + }) + subcategory: string; + + @Column({ + nullable: true, + length: 128, + }) + definition: string; + + @Column({ + nullable: true, + length: 128, + }) + objective: string; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + result_criteria: ResultsCriteria[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + causes: Causes[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + related_clinical_condition: RelatedClinicalCondition[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + subjective_major: Causes[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + objectitve_major: Causes[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + subjective_minor: Causes[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + objective_minor: Causes[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + observation: RelatedClinicalCondition[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + therapeutic: RelatedClinicalCondition[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + education: RelatedClinicalCondition[]; + + @Column({ + nullable: true, + type: 'jsonb', + default: [], + }) + colaboration: RelatedClinicalCondition[]; + @CreateDateColumn() created_at: Date;