healthdatalayer 1.5.8__py3-none-any.whl → 1.5.9__py3-none-any.whl

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.

@@ -169,6 +169,7 @@ class CollaboratorRepository:
169
169
  FROM medical_visit t
170
170
  WHERE t.visit_date::DATE = :fecha
171
171
  AND t.collaborator_id = :colab_id
172
+ AND t.status_visit in ('AGENDADO','REAGENDADO')
172
173
  )
173
174
  SELECT
174
175
  hg.hora,
@@ -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,or_
4
4
 
5
5
  from healthdatalayer.models import MedicalDrug
6
6
  from healthdatalayer.config.db import engines, get_session
@@ -60,4 +60,19 @@ class MedicalDrugRepository:
60
60
  session.delete(db_medical_drug)
61
61
 
62
62
  session.commit()
63
- return True
63
+ return True
64
+
65
+ def get_by_name_code_ilike_command(self, name:str, active_only: bool = True) -> List[MedicalDrug]:
66
+ with get_session(self.tenant) as session:
67
+ statement = select(MedicalDrug).where(
68
+ or_(
69
+ MedicalDrug.drug_name.ilike(f"%{name}%"),
70
+ MedicalDrug.drug_code.ilike(f"%{name}%")
71
+ )
72
+ )
73
+
74
+ if active_only:
75
+ statement = statement.where(MedicalDrug.is_active == True)
76
+
77
+ medical_diagnosis = session.exec(statement).all()
78
+ return medical_diagnosis
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: healthdatalayer
3
- Version: 1.5.8
3
+ Version: 1.5.9
4
4
  Summary: Health Datalayer to access data from different sources
5
5
  Author: Jesus Martinez
6
6
  Author-email: jesusmartinez@noosds.com
@@ -70,7 +70,7 @@ healthdatalayer/repositories/client_repositories/pet_repository.py,sha256=aUjti4
70
70
  healthdatalayer/repositories/client_repositories/profession_repository.py,sha256=ALnx_y_z9Jfx9rBDvOdnK1P1_lkqKmFBeR1GVXj3m3Q,2620
71
71
  healthdatalayer/repositories/client_repositories/px_repository.py,sha256=cTXDfKolG5aLdlQzXV98_r4Y1Qm5jYW9cUtntdw7e0k,10116
72
72
  healthdatalayer/repositories/collaborator_repositories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
- healthdatalayer/repositories/collaborator_repositories/collaborator_repository.py,sha256=NBCYH3ziSZ6-SZJDsDVvMrM9oCWYqXpDAUIkh7bzEOo,8261
73
+ healthdatalayer/repositories/collaborator_repositories/collaborator_repository.py,sha256=jSKoM46Rp4MDjI1cotr2setidP9su8GKZBC5EsIr6Po,8329
74
74
  healthdatalayer/repositories/collaborator_repositories/collaborator_type_repository.py,sha256=7-bJqbxgsJtyRU7nV_YCZhKufYLlighWBWjglw70nUw,2858
75
75
  healthdatalayer/repositories/collaborator_repositories/speciality_repository.py,sha256=tcAjp2OzFAnHpRKNdmw2Zsqvs7XdsO51h7cIJHt105s,2940
76
76
  healthdatalayer/repositories/infraestructure_repositories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -87,7 +87,7 @@ healthdatalayer/repositories/medical_visit_repositories/__init__.py,sha256=47DEQ
87
87
  healthdatalayer/repositories/medical_visit_repositories/medical_diagnosis_repository.py,sha256=hwb5vh64ze72tFMSIUPNitC5t6pUCcO6pnI0gk-7LZU,4157
88
88
  healthdatalayer/repositories/medical_visit_repositories/medical_diagnosis_visit_repository.py,sha256=5-QSverT7FN5nay2j_EevCqNAnuD--FTDVQnj0_WRhs,5508
89
89
  healthdatalayer/repositories/medical_visit_repositories/medical_drug_recipe_repository.py,sha256=6rubP_KtheyJSvLmpBJwYuPKNsjhSvKi-_HM2QoP1hM,3141
90
- healthdatalayer/repositories/medical_visit_repositories/medical_drug_repository.py,sha256=mJNN6_aAK3eY9IpFc16nT3IshObGcFE5fi27SK-Sjio,2401
90
+ healthdatalayer/repositories/medical_visit_repositories/medical_drug_repository.py,sha256=woyrx4vuV7hpxS9WOZNmCTsfWrZiXoMV2__x9lTqPJY,3011
91
91
  healthdatalayer/repositories/medical_visit_repositories/medical_recipe_visit_repository.py,sha256=j4cJ4zURKILN3lkqfpXya29MQYFIMiTmJukOADBj5_c,4551
92
92
  healthdatalayer/repositories/medical_visit_repositories/medical_visit_repository.py,sha256=vATKxoBimx_-VYtqnxx-6u4sdU7u8sjtE2y6Kr2uepM,17186
93
93
  healthdatalayer/repositories/medical_visit_repositories/organ_system_review_repository.py,sha256=7QNxpQIFcD6B8CX5fua8Qck75j24Y4uEkR_Lans1_0A,4197
@@ -97,7 +97,7 @@ healthdatalayer/repositories/user_repositories/__init__.py,sha256=47DEQpj8HBSa-_
97
97
  healthdatalayer/repositories/user_repositories/permission_repository.py,sha256=3L4y-zCkI2PIRo-L3FJRSk4g3nZnu6q35lEY4ACJyq4,9630
98
98
  healthdatalayer/repositories/user_repositories/role_repository.py,sha256=jIsbeAFFQQ_CZJqBMcOskuMXtT1Il6eiN0Y2BpVO1JE,6821
99
99
  healthdatalayer/repositories/user_repositories/user_repository.py,sha256=FUCNdRRGc12dq5XuwDT3btvDETt6HGXh_xQIPTLCAvk,9839
100
- healthdatalayer-1.5.8.dist-info/METADATA,sha256=sSx2K1H-4AGHOmI2CUu6plxDEkBmWrA9FM9oSe0wNt0,827
101
- healthdatalayer-1.5.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
- healthdatalayer-1.5.8.dist-info/top_level.txt,sha256=6f1-gvpg533UEVuYsRJCDhdSDQUBwijyAHylyS4nG_4,16
103
- healthdatalayer-1.5.8.dist-info/RECORD,,
100
+ healthdatalayer-1.5.9.dist-info/METADATA,sha256=55bxMtiwWzQVEqdSgHZIDukDPbdjDq9wItzGvVN9QH0,827
101
+ healthdatalayer-1.5.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
+ healthdatalayer-1.5.9.dist-info/top_level.txt,sha256=6f1-gvpg533UEVuYsRJCDhdSDQUBwijyAHylyS4nG_4,16
103
+ healthdatalayer-1.5.9.dist-info/RECORD,,