2020-11-16 16:30:41 +01:00
|
|
|
from rest_framework import serializers
|
|
|
|
from apps.synthea.models import Synthea
|
|
|
|
|
|
|
|
class SyntheaSerializer(serializers.ModelSerializer):
|
|
|
|
class Meta:
|
|
|
|
model = Synthea
|
2020-11-17 11:40:11 +01:00
|
|
|
fields = ['state', 'population', 'gender', 'age', 'module']
|
|
|
|
|
|
|
|
class SyntheaModelsSerializer(serializers.Serializer):
|
|
|
|
id = serializers.CharField(max_length=200)
|
|
|
|
name = serializers.CharField(max_length=200)
|
|
|
|
|
|
|
|
|
|
|
|
class SyntheaStatesSerializer(serializers.Serializer):
|
|
|
|
id = serializers.CharField(max_length=200)
|
|
|
|
name = serializers.CharField(max_length=200)
|