Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add consultation serializer for Investigation #1876

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions care/facility/api/serializers/patient_investigation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from rest_framework import serializers

from care.facility.api.serializers import TIMESTAMP_FIELDS
from care.facility.api.serializers.patient_consultation import (
PatientConsultationSerializer,
)
from care.facility.models.patient_investigation import (
InvestigationSession,
InvestigationValue,
Expand Down Expand Up @@ -41,6 +44,10 @@ class Meta:
class InvestigationValueSerializer(serializers.ModelSerializer):
id = serializers.CharField(source="external_id", read_only=True)

consultation_object = PatientConsultationSerializer(
source="consultation", read_only=True
)

group_object = PatientInvestigationGroupSerializer(source="group", read_only=True)
investigation_object = MinimalPatientInvestigationSerializer(
source="investigation", read_only=True
Expand Down
Loading