HIS pharmacy serializers
unknown
python
a year ago
451 B
7
Indexable
Never
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']