Skip to content

Commit

Permalink
Merge pull request #1494 from openhealthcare/merge-111
Browse files Browse the repository at this point in the history
Merge prod branch into Cerner test branch
  • Loading branch information
davidmiller authored Sep 10, 2023
2 parents 914748b + a651a80 commit fa585e2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion elcid/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
EMAIL_HOST = 'localhost'


VERSION_NUMBER = '0.110'
VERSION_NUMBER = '0.111'

#TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
#TEST_RUNNER = 'django_test_coverage.runner.CoverageTestSuiteRunner'
Expand Down
2 changes: 1 addition & 1 deletion intrahospital_api/management/commands/batch_load2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from plugins.labtests.models import Observation
from plugins.monitoring.models import Fact

MAX_AMOUNT = 250000
MAX_AMOUNT = 350000


@transaction.atomic
Expand Down
9 changes: 8 additions & 1 deletion plugins/elcid_search/elcid_query.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from opal.core.search.queries import DatabaseQuery
from opal.models import Patient
from elcid.models import Demographics
from opal.core.search.queries import DatabaseQuery, PatientSummary
from elcid import models

Expand All @@ -17,7 +20,6 @@ def to_dict(self):
result["previous_mrns"] = list(previous_merges.values_list('mrn', flat=True))
return result


class ElcidSearchQuery(DatabaseQuery):
patient_summary_class = ElcidPatientSummary

Expand All @@ -31,4 +33,9 @@ def fuzzy_query(self):
"""
query_parts = self.query.split(" ")
self.query = " ".join(i.lstrip('0') for i in query_parts)
self.query = self.query.strip()

if Demographics.objects.filter(hospital_number=self.query).exists():
return [Patient.objects.get(demographics__hospital_number=self.query)]

return super().fuzzy_query()

0 comments on commit fa585e2

Please sign in to comment.