HIS pharmacy serializers

mail@pastecode.io avatar
unknown
python
2 years ago
451 B
7
Indexable
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']