healthdatalayer 1.5.4__py3-none-any.whl → 1.5.5__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.
@@ -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 MedicalDiagnosis
6
6
  from healthdatalayer.config.db import engines, get_session
@@ -32,9 +32,14 @@ class MedicalDiagnosisRepository:
32
32
  medical_diagnosis = session.exec(statement).first()
33
33
  return medical_diagnosis
34
34
 
35
- def get_by_name_ilike_command(self, name:str, active_only: bool = True) -> List[MedicalDiagnosis]:
35
+ def get_by_name_code_ilike_command(self, name:str, active_only: bool = True) -> List[MedicalDiagnosis]:
36
36
  with get_session(self.tenant) as session:
37
- statement = select(MedicalDiagnosis).where(MedicalDiagnosis.name.ilike(f"%{name}%"))
37
+ statement = select(MedicalDiagnosis).where(
38
+ or_(
39
+ MedicalDiagnosis.name.ilike(f"%{name}%"),
40
+ MedicalDiagnosis.cie_10_code.ilike(f"%{name}%")
41
+ )
42
+ )
38
43
 
39
44
  if active_only:
40
45
  statement = statement.where(MedicalDiagnosis.is_active == True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: healthdatalayer
3
- Version: 1.5.4
3
+ Version: 1.5.5
4
4
  Summary: Health Datalayer to access data from different sources
5
5
  Author: Jesus Martinez
6
6
  Author-email: jesusmartinez@noosds.com
@@ -84,7 +84,7 @@ healthdatalayer/repositories/lab_repositories/__init__.py,sha256=47DEQpj8HBSa-_T
84
84
  healthdatalayer/repositories/lab_repositories/measure_lab_repository.py,sha256=AAwgGjaLWTqyH3YHTD_eisunn6I0E0GmYLEseuLgZ0Q,3174
85
85
  healthdatalayer/repositories/lab_repositories/medical_lab_repository.py,sha256=owZQe3cXKkXsRuGXpqPBXjZvA-DEb7yD1OKPMOCqF1o,10909
86
86
  healthdatalayer/repositories/medical_visit_repositories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
- healthdatalayer/repositories/medical_visit_repositories/medical_diagnosis_repository.py,sha256=dnVW3hMUqrVGctBSNKVU2_j0ITH46aXN31XduELO8wg,4012
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=BHhglV8CBw4xpcLsFjRJPglg2D0ASnYD2k4RmbP80tU,5499
89
89
  healthdatalayer/repositories/medical_visit_repositories/medical_drug_recipe_repository.py,sha256=6rubP_KtheyJSvLmpBJwYuPKNsjhSvKi-_HM2QoP1hM,3141
90
90
  healthdatalayer/repositories/medical_visit_repositories/medical_drug_repository.py,sha256=mJNN6_aAK3eY9IpFc16nT3IshObGcFE5fi27SK-Sjio,2401
@@ -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.4.dist-info/METADATA,sha256=bqu_siXQB-Xn2dwFXeurSFOXdCZT5SqIrZRA57b7Yxc,827
101
- healthdatalayer-1.5.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
- healthdatalayer-1.5.4.dist-info/top_level.txt,sha256=6f1-gvpg533UEVuYsRJCDhdSDQUBwijyAHylyS4nG_4,16
103
- healthdatalayer-1.5.4.dist-info/RECORD,,
100
+ healthdatalayer-1.5.5.dist-info/METADATA,sha256=FI6jWXF1Buf7HqOFDKYHKVxaQ8iB5T_lgdkmsNR2VvE,827
101
+ healthdatalayer-1.5.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
102
+ healthdatalayer-1.5.5.dist-info/top_level.txt,sha256=6f1-gvpg533UEVuYsRJCDhdSDQUBwijyAHylyS4nG_4,16
103
+ healthdatalayer-1.5.5.dist-info/RECORD,,