class PatientLabTestRequestSerializer(serializers.ModelSerializer):
    lab_test = LabTestSerializer()
    requested_by = DoctorProfilePrivateSerializer()
    removed_by = DoctorProfilePrivateSerializer()
    class Meta:
        model = PatientLabTestRequest
        fields = '__all__'
Esempio n. 2
0
class PatientFindingSerializer(serializers.ModelSerializer):
    finding = FindingSerializer()
    checkup = PatientCheckupRecordSerializer()
    added_by = DoctorProfilePrivateSerializer()
    removed_by = DoctorProfilePrivateSerializer()

    class Meta:
        model = PatientFinding
        fields = ('id', 'finding', 'checkup', 'is_deleted', 'added_by',
                  'removed_by')
class PatientDiagnoseserializer(serializers.ModelSerializer):
    diagnosis = Diagnoseserializer()
    checkup = PatientCheckupRecordSerializer()
    added_by = DoctorProfilePrivateSerializer()
    removed_by = DoctorProfilePrivateSerializer()

    class Meta:
        model = PatientDiagnosis
        fields = ('id', 'diagnosis', 'checkup', 'is_deleted', 'added_by',
                  'removed_by')
class PatientSymptomSerializer(serializers.ModelSerializer):
    symptom = SymptomSerializer()
    checkup = PatientCheckupRecordSerializer()
    added_by = DoctorProfilePrivateSerializer()
    removed_by = DoctorProfilePrivateSerializer()

    class Meta:
        model = PatientSymptom
        fields = ('id', 'symptom', 'checkup', 'is_deleted', 'added_by',
                  'removed_by')
Esempio n. 5
0
class PatientPrescriptionSerializer(serializers.ModelSerializer):
    drug = DrugSerializer()
    prescription_route = DrugRouteSerializer()
    doctor = DoctorProfilePrivateSerializer()
    removed_by = DoctorProfilePrivateSerializer()

    class Meta:
        model = Prescription
        fields = ('id', 'drug', 'checkup', 'doctor', 'prescription_dosage',
                  'prescription_dosage_unit', 'prescription_amount',
                  'prescription_amount_unit', 'prescription_route',
                  'prescription_frequency', 'prescription_dispense_qty',
                  'prescription_notes', 'removed_by')
Esempio n. 6
0
class ReceptionistConnectionPrivateNestedSerializer(serializers.ModelSerializer):
    doctor = DoctorProfilePrivateSerializer()
    medical_institution = MedicalInstitutionTypePublicSerializer(allow_null=True)
    receptionist = ReceptionistProfileSerializer(allow_null=True)

    class Meta:
        model = ReceptionistConnection
        fields = (
            'receptionist',
            'doctor',
            'medical_institution'
        )
class CheckupNoteSerializer(serializers.ModelSerializer):
    added_by = DoctorProfilePrivateSerializer()

    class Meta:
        model = CheckupNote
        fields = ('id', 'note', 'checkup', 'added_by', 'created')
    def post(self, request, *args, **kwargs):
        profile = request.user.create_doctor_profile()

        serializer = DoctorProfilePrivateSerializer(profile)

        return Response(serializer.data, status=status.HTTP_200_OK)