healthdatalayer 1.4.5__tar.gz → 1.5.0__tar.gz
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.
Potentially problematic release.
This version of healthdatalayer might be problematic. Click here for more details.
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/PKG-INFO +1 -1
- healthdatalayer-1.5.0/healthdatalayer/dtos/__init__.py +1 -0
- healthdatalayer-1.5.0/healthdatalayer/dtos/collaborator/schedule_collaborator.py +13 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/collaborator_repositories/collaborator_repository.py +48 -2
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/medical_diagnosis_repository.py +30 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/medical_diagnosis_visit_repository.py +19 -2
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/visit_triage_repository.py +8 -2
- healthdatalayer-1.5.0/healthdatalayer/repositories/user_repositories/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer.egg-info/PKG-INFO +1 -1
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer.egg-info/SOURCES.txt +3 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/setup.py +1 -1
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/README.md +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/config/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/config/config.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/config/db.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/config/vault.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/models/bridge_area_floor_branch → healthdatalayer-1.5.0/healthdatalayer/dtos/collaborator}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/__init__.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/models/client → healthdatalayer-1.5.0/healthdatalayer/models/bridge_area_floor_branch}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/bridge_area_floor_branch/area.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/bridge_area_floor_branch/branch.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/bridge_area_floor_branch/bridge_area_floor_branch.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/bridge_area_floor_branch/floor.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/bridge_area_floor_branch/room.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/bridge_area_floor_branch/system.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/models/collaborator → healthdatalayer-1.5.0/healthdatalayer/models/client}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/address.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/city.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/client.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/client_type.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/education.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/emergency_contact.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/gender.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/marriage_status.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/nationality.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/pathological_history.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/pet.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/profession.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/px.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/state.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/models/lab → healthdatalayer-1.5.0/healthdatalayer/models/collaborator}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/collaborator/collaborator.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/collaborator/collaborator_speciality.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/collaborator/collaborator_type.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/collaborator/speciality.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/models/medical_visit → healthdatalayer-1.5.0/healthdatalayer/models/lab}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/lab/client_lab.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/lab/measure_lab.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/lab/medical_lab.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/models/user → healthdatalayer-1.5.0/healthdatalayer/models/medical_visit}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/medical_diagnosis.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/medical_diagnosis_visit.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/medical_drug.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/medical_drug_recipe.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/medical_recipe_visit.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/medical_visit.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/organ_system_review.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/physical_exam.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/status_visit_enum.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/visit_triage.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/repositories/client_repositories → healthdatalayer-1.5.0/healthdatalayer/models/user}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/user/permission.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/user/permission_user.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/user/role.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/user/role_permission.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/user/role_user.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/user/user.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/__init__.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/repositories/collaborator_repositories → healthdatalayer-1.5.0/healthdatalayer/repositories/client_repositories}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/address_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/client_type_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/education_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/emergency_contact_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/gender_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/marriage_status_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/nationality_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/pathological_history_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/pet_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/profession_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/client_repositories/px_repository.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/repositories/infraestructure_repositories → healthdatalayer-1.5.0/healthdatalayer/repositories/collaborator_repositories}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/collaborator_repositories/collaborator_type_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/collaborator_repositories/speciality_repository.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/repositories/lab_repositories → healthdatalayer-1.5.0/healthdatalayer/repositories/infraestructure_repositories}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/infraestructure_repositories/area_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/infraestructure_repositories/branch_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/infraestructure_repositories/bridge_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/infraestructure_repositories/floor_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/infraestructure_repositories/room_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/infraestructure_repositories/system_repository.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/repositories/medical_visit_repositories → healthdatalayer-1.5.0/healthdatalayer/repositories/lab_repositories}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/lab_repositories/measure_lab_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/lab_repositories/medical_lab_repository.py +0 -0
- {healthdatalayer-1.4.5/healthdatalayer/repositories/user_repositories → healthdatalayer-1.5.0/healthdatalayer/repositories/medical_visit_repositories}/__init__.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/medical_drug_recipe_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/medical_drug_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/medical_recipe_visit_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/medical_visit_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/organ_system_review_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/medical_visit_repositories/physical_exam_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/user_repositories/permission_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/user_repositories/role_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/repositories/user_repositories/user_repository.py +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer.egg-info/dependency_links.txt +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer.egg-info/requires.txt +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer.egg-info/top_level.txt +0 -0
- {healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .collaborator.schedule_collaborator import ScheduleCollaboratorDTO
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from pydantic import BaseModel, Field
|
|
2
|
+
from typing import List
|
|
3
|
+
from datetime import time
|
|
4
|
+
|
|
5
|
+
class ScheduleCollaboratorDTO(BaseModel):
|
|
6
|
+
|
|
7
|
+
available_schedules: List[str] = Field(default_factory=list)
|
|
8
|
+
busy_schedules: List[str] = Field(default_factory=list)
|
|
9
|
+
|
|
10
|
+
class Config:
|
|
11
|
+
json_encoders = {
|
|
12
|
+
time: lambda v: v.strftime('%H:%M')
|
|
13
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
from datetime import date
|
|
1
2
|
from typing import Optional, List
|
|
2
3
|
from uuid import UUID
|
|
3
|
-
from sqlmodel import select, or_, join
|
|
4
|
+
from sqlmodel import select, or_, join, text
|
|
4
5
|
from sqlalchemy.orm import selectinload,joinedload
|
|
5
6
|
from healthdatalayer.models import Collaborator
|
|
6
7
|
from healthdatalayer.models import Speciality, CollaboratorSpeciality
|
|
8
|
+
from healthdatalayer.dtos import ScheduleCollaboratorDTO
|
|
7
9
|
from healthdatalayer.config.db import engines, get_session
|
|
8
10
|
|
|
9
11
|
class CollaboratorRepository:
|
|
@@ -147,4 +149,48 @@ class CollaboratorRepository:
|
|
|
147
149
|
session.commit()
|
|
148
150
|
session.refresh(collab)
|
|
149
151
|
|
|
150
|
-
return collab
|
|
152
|
+
return collab
|
|
153
|
+
|
|
154
|
+
def get_availability_schedules_command(self, visit_date: date, collaborator_id: str) -> ScheduleCollaboratorDTO:
|
|
155
|
+
|
|
156
|
+
with get_session(self.tenant) as session:
|
|
157
|
+
|
|
158
|
+
query = text("""
|
|
159
|
+
WITH horarios_generados AS (
|
|
160
|
+
SELECT horario::TIME as hora
|
|
161
|
+
FROM generate_series(
|
|
162
|
+
:fecha::DATE + TIME '08:00:00',
|
|
163
|
+
:fecha::DATE + TIME '17:00:00',
|
|
164
|
+
INTERVAL '30 minutes'
|
|
165
|
+
) AS horario
|
|
166
|
+
),
|
|
167
|
+
horarios_ocupados AS (
|
|
168
|
+
SELECT t.visit_date::TIME as hora
|
|
169
|
+
FROM medical_visit t
|
|
170
|
+
WHERE t.visit_date::DATE = :fecha
|
|
171
|
+
AND t.collaborator_id = :colab_id
|
|
172
|
+
)
|
|
173
|
+
SELECT
|
|
174
|
+
hg.hora,
|
|
175
|
+
CASE WHEN ho.hora IS NOT NULL THEN true ELSE false END as ocupado
|
|
176
|
+
FROM horarios_generados hg
|
|
177
|
+
LEFT JOIN horarios_ocupados ho ON hg.hora = ho.hora
|
|
178
|
+
ORDER BY hg.hora
|
|
179
|
+
""")
|
|
180
|
+
|
|
181
|
+
result = session.exec(query, {"fecha": visit_date, "colab_id": collaborator_id})
|
|
182
|
+
|
|
183
|
+
availables = []
|
|
184
|
+
busy = []
|
|
185
|
+
|
|
186
|
+
for row in result:
|
|
187
|
+
hour, is_busy = row[0], row[1]
|
|
188
|
+
if is_busy:
|
|
189
|
+
busy.append(hour)
|
|
190
|
+
else:
|
|
191
|
+
availables.append(hour)
|
|
192
|
+
|
|
193
|
+
return ScheduleCollaboratorDTO(
|
|
194
|
+
available_schedules=availables,
|
|
195
|
+
busy_schedules=busy
|
|
196
|
+
)
|
|
@@ -21,6 +21,36 @@ class MedicalDiagnosisRepository:
|
|
|
21
21
|
def get_by_id_command(self, medical_diagnosis_id: UUID) -> Optional[MedicalDiagnosis]:
|
|
22
22
|
with get_session(self.tenant) as session:
|
|
23
23
|
return session.get(MedicalDiagnosis, medical_diagnosis_id)
|
|
24
|
+
|
|
25
|
+
def get_by_name_command(self, name:str, active_only: bool = True) -> Optional[MedicalDiagnosis]:
|
|
26
|
+
with get_session(self.tenant) as session:
|
|
27
|
+
statement = select(MedicalDiagnosis).where(MedicalDiagnosis.name == name)
|
|
28
|
+
|
|
29
|
+
if active_only:
|
|
30
|
+
statement = statement.where(MedicalDiagnosis.is_active == True)
|
|
31
|
+
|
|
32
|
+
medical_diagnosis = session.exec(statement).first()
|
|
33
|
+
return medical_diagnosis
|
|
34
|
+
|
|
35
|
+
def get_by_name_ilike_command(self, name:str, active_only: bool = True) -> List[MedicalDiagnosis]:
|
|
36
|
+
with get_session(self.tenant) as session:
|
|
37
|
+
statement = select(MedicalDiagnosis).where(MedicalDiagnosis.name.ilike(f"%{name}%"))
|
|
38
|
+
|
|
39
|
+
if active_only:
|
|
40
|
+
statement = statement.where(MedicalDiagnosis.is_active == True)
|
|
41
|
+
|
|
42
|
+
medical_diagnosis = session.exec(statement).all()
|
|
43
|
+
return medical_diagnosis
|
|
44
|
+
|
|
45
|
+
def get_by_code_command(self, code:str, active_only: bool = True) -> Optional[MedicalDiagnosis]:
|
|
46
|
+
with get_session(self.tenant) as session:
|
|
47
|
+
statement = select(MedicalDiagnosis).where(MedicalDiagnosis.cie_10_code == code)
|
|
48
|
+
|
|
49
|
+
if active_only:
|
|
50
|
+
statement = statement.where(MedicalDiagnosis.is_active == True)
|
|
51
|
+
|
|
52
|
+
medical_diagnosis = session.exec(statement).first()
|
|
53
|
+
return medical_diagnosis
|
|
24
54
|
|
|
25
55
|
def list_all_command(self, active_only: bool = True) -> List[MedicalDiagnosis]:
|
|
26
56
|
with get_session(self.tenant) as session:
|
|
@@ -33,10 +33,27 @@ class MedicalDiagnosisVisitRepository:
|
|
|
33
33
|
else:
|
|
34
34
|
return session.get(MedicalDiagnosisVisit, medical_diagnosis_visit_id)
|
|
35
35
|
|
|
36
|
-
def get_by_medical_visit_id_command(self, medical_visit_id: UUID, load_relations: bool = False) ->
|
|
36
|
+
def get_by_medical_visit_id_command(self, medical_visit_id: UUID, load_relations: bool = False) ->List[MedicalDiagnosisVisit]:
|
|
37
37
|
with get_session(self.tenant) as session:
|
|
38
38
|
|
|
39
39
|
statement = select(MedicalDiagnosisVisit).where(MedicalDiagnosisVisit.medical_visit_id == medical_visit_id)
|
|
40
|
+
if load_relations:
|
|
41
|
+
statement = statement.options(
|
|
42
|
+
joinedload(MedicalDiagnosisVisit.medical_visit),
|
|
43
|
+
joinedload(MedicalDiagnosisVisit.medical_diagnosis)
|
|
44
|
+
)
|
|
45
|
+
medical_diagnosis_visits = session.exec(statement).all()
|
|
46
|
+
|
|
47
|
+
return medical_diagnosis_visits
|
|
48
|
+
|
|
49
|
+
def get_by_medicalvisitid_and_diagnosisid_command(self, medical_visit_id: UUID, medical_diagnosis_id: UUID, load_relations: bool = False) ->Optional[MedicalDiagnosisVisit]:
|
|
50
|
+
with get_session(self.tenant) as session:
|
|
51
|
+
|
|
52
|
+
statement = select(MedicalDiagnosisVisit).where(
|
|
53
|
+
MedicalDiagnosisVisit.medical_visit_id == medical_visit_id,
|
|
54
|
+
MedicalDiagnosisVisit.medical_diagnosis_id == medical_diagnosis_id
|
|
55
|
+
)
|
|
56
|
+
|
|
40
57
|
if load_relations:
|
|
41
58
|
statement = statement.options(
|
|
42
59
|
joinedload(MedicalDiagnosisVisit.medical_visit),
|
|
@@ -46,7 +63,7 @@ class MedicalDiagnosisVisitRepository:
|
|
|
46
63
|
|
|
47
64
|
return medical_diagnosis_visit
|
|
48
65
|
|
|
49
|
-
def
|
|
66
|
+
def list_all_command(self, active_only: bool = True,load_related: bool = False) -> List[MedicalDiagnosisVisit]:
|
|
50
67
|
with get_session(self.tenant) as session:
|
|
51
68
|
|
|
52
69
|
statement = select(MedicalDiagnosisVisit)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Optional, List
|
|
2
2
|
from uuid import UUID
|
|
3
|
-
from sqlmodel import select
|
|
3
|
+
from sqlmodel import select
|
|
4
4
|
from sqlalchemy.orm import selectinload,joinedload
|
|
5
5
|
from healthdatalayer.models import VisitTriage
|
|
6
6
|
from healthdatalayer.models import MedicalVisit
|
|
@@ -86,4 +86,10 @@ class VisitTriageRepository:
|
|
|
86
86
|
else:
|
|
87
87
|
session.delete(existing_visit_triage)
|
|
88
88
|
|
|
89
|
-
session.commit()
|
|
89
|
+
session.commit()
|
|
90
|
+
|
|
91
|
+
def exists_by_medical_visit_id_command(self, medical_visit_id: UUID) -> bool:
|
|
92
|
+
with get_session(self.tenant) as session:
|
|
93
|
+
statement = select(VisitTriage).where(VisitTriage.medical_visit_id == medical_visit_id)
|
|
94
|
+
result = session.exec(statement).first()
|
|
95
|
+
return result is not None
|
|
File without changes
|
|
@@ -10,6 +10,9 @@ healthdatalayer/config/__init__.py
|
|
|
10
10
|
healthdatalayer/config/config.py
|
|
11
11
|
healthdatalayer/config/db.py
|
|
12
12
|
healthdatalayer/config/vault.py
|
|
13
|
+
healthdatalayer/dtos/__init__.py
|
|
14
|
+
healthdatalayer/dtos/collaborator/__init__.py
|
|
15
|
+
healthdatalayer/dtos/collaborator/schedule_collaborator.py
|
|
13
16
|
healthdatalayer/models/__init__.py
|
|
14
17
|
healthdatalayer/models/bridge_area_floor_branch/__init__.py
|
|
15
18
|
healthdatalayer/models/bridge_area_floor_branch/area.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/client_type.py
RENAMED
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/emergency_contact.py
RENAMED
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/marriage_status.py
RENAMED
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/client/nationality.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/collaborator/collaborator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/collaborator/speciality.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/medical_drug.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/medical_visit/visit_triage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/user/permission_user.py
RENAMED
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer/models/user/role_permission.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{healthdatalayer-1.4.5 → healthdatalayer-1.5.0}/healthdatalayer.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|