Skip to content

Commit

Permalink
Fix issues in note creation
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshhari committed Jan 2, 2025
1 parent 38f432e commit 954ddca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion care/emr/api/viewsets/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_patient(self):
def authorize_create(self, instance):
patient = self.get_patient()
if instance.encounter:
encounter = get_object_or_404(Encounter, instance.encounter)
encounter = get_object_or_404(Encounter, external_id=instance.encounter)
allowed = AuthorizationController.call(
"can_update_encounter_obj", self.request.user, encounter
)
Expand Down
3 changes: 1 addition & 2 deletions config/api_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
AvailabilityExceptionsViewSet,
)
from care.emr.api.viewsets.scheduling.booking import TokenBookingViewSet
from care.emr.api.viewsets.units import UnitsView
from care.emr.api.viewsets.user import UserViewSet
from care.emr.api.viewsets.valueset import ValueSetViewSet
from care.facility.api.viewsets.facility import AllFacilityViewSet
Expand Down Expand Up @@ -78,7 +77,7 @@

router.register("batch_requests", BatchRequestView, basename="batch-requests")

router.register("units", UnitsView, basename="units")
# router.register("units", UnitsView, basename="units")

router.register("valueset", ValueSetViewSet, basename="value-set")

Expand Down

0 comments on commit 954ddca

Please sign in to comment.