@virtality/schema 0.0.1-alpha0.1.0 → 0.0.1-alpha0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virtality/schema",
3
- "version": "0.0.1-alpha0.1.0",
3
+ "version": "0.0.1-alpha0.1.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -0,0 +1,30 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `history` on the `Patient` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "Patient" DROP COLUMN "history";
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "SessionData" ADD COLUMN "nprs" TEXT,
12
+ ADD COLUMN "otherTherapies" JSONB;
13
+
14
+ -- CreateTable
15
+ CREATE TABLE "MedicalHistory" (
16
+ "id" TEXT NOT NULL,
17
+ "patientId" TEXT NOT NULL,
18
+ "anamneses" TEXT,
19
+ "complaints" TEXT,
20
+ "expectations" TEXT,
21
+ "diagnosis" TEXT,
22
+ "nprs" TEXT,
23
+ "bodyFront" JSONB,
24
+ "bodyBack" JSONB,
25
+
26
+ CONSTRAINT "MedicalHistory_pkey" PRIMARY KEY ("id")
27
+ );
28
+
29
+ -- AddForeignKey
30
+ ALTER TABLE "MedicalHistory" ADD CONSTRAINT "MedicalHistory_patientId_fkey" FOREIGN KEY ("patientId") REFERENCES "Patient"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -161,7 +161,6 @@ model Patient {
161
161
  sex String?
162
162
  weight String?
163
163
  height String?
164
- history String?
165
164
  occupation String?
166
165
  language Language @default(Greek)
167
166
  image String? @unique
@@ -169,6 +168,20 @@ model Patient {
169
168
  updatedAt DateTime @default(now()) @db.Timestamp(6)
170
169
  deletedAt DateTime? @db.Timestamp(6)
171
170
  patientProgram PatientProgram[]
171
+ medicalHistory MedicalHistory[]
172
+ }
173
+
174
+ model MedicalHistory {
175
+ id String @id
176
+ patientId String
177
+ anamneses String?
178
+ complaints String?
179
+ expectations String?
180
+ diagnosis String?
181
+ nprs String?
182
+ bodyFront Json?
183
+ bodyBack Json?
184
+ patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
172
185
  }
173
186
 
174
187
  model Preset {
@@ -254,6 +267,8 @@ model SessionData {
254
267
  patientSessionId String?
255
268
  sessionExerciseId String?
256
269
  value String
270
+ nprs String?
271
+ otherTherapies Json?
257
272
  session PatientSession? @relation(fields: [patientSessionId], references: [id], onDelete: SetNull)
258
273
  sessionExercise SessionExercise? @relation(fields: [sessionExerciseId], references: [id], onDelete: SetNull)
259
274
  }