-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathnotes.py
41 lines (33 loc) · 1.95 KB
/
notes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import deferred
from .main import db
class ClinicalNotes(db.Model):
__tablename__ = "evolucao"
id = db.Column("fkevolucao", db.BigInteger, primary_key=True)
admissionNumber = db.Column("nratendimento", db.BigInteger, nullable=False)
text = db.Column("texto", db.String, nullable=False)
date = db.Column("dtevolucao", db.DateTime, nullable=False)
prescriber = db.Column("prescritor", db.String, nullable=True)
position = db.Column("cargo", db.String, nullable=True)
update = db.Column("update_at", db.DateTime, nullable=True)
user = db.Column("update_by", db.BigInteger, nullable=True)
medications = db.Column("medicamentos", db.Integer, nullable=True)
complication = db.Column("complicacoes", db.Integer, nullable=True)
symptoms = db.Column("sintomas", db.Integer, nullable=True)
diseases = db.Column("doencas", db.Integer, nullable=True)
info = db.Column("dados", db.Integer, nullable=True)
conduct = db.Column("conduta", db.Integer, nullable=True)
signs = db.Column("sinais", db.Integer, nullable=True)
allergy = db.Column("alergia", db.Integer, nullable=True)
dialysis = db.Column("dialise", db.Integer, nullable=True)
names = db.Column("nomes", db.Integer, nullable=True)
signsText = db.Column("sinaistexto", db.String, nullable=True)
infoText = db.Column("dadostexto", db.String, nullable=True)
allergyText = db.Column("alergiatexto", db.String, nullable=True)
dialysisText = db.Column("dialisetexto", db.String, nullable=True)
isExam = db.Column("exame", db.Boolean, nullable=False)
# primary care columns
form = deferred(db.Column("formulario", postgresql.JSON, nullable=True))
template = deferred(db.Column("template", postgresql.JSON, nullable=True))
summary = deferred(db.Column("sumario", postgresql.JSONB, nullable=True))
annotations = deferred(db.Column("anotacoes", postgresql.JSONB, nullable=True))