HIS pharmacy serializers
from rest_framework import serializers from .models import Drug, DrugRequestDetail class DrugSerializer(serializers.ModelSerializer): class Meta: model = Drug fields = ['name', 'drug_form', 'brand_name', 'company', 'description', 'stock_level', 'expiry_date', 'price'] class DrugRequestSerializer(serializers.ModelSerializer): class Meta: model = DrugRequestDetail fields = ['medication', 'drug', 'dispense']