"""
Serializers for HIS simulator API endpoints
"""
from rest_framework import serializers


class HISJourneyEventSerializer(serializers.Serializer):
    """Serializer for individual HIS journey event"""
    encounter_id = serializers.CharField(max_length=100)
    mrn = serializers.CharField(max_length=50)
    national_id = serializers.CharField(max_length=20)
    first_name = serializers.CharField(max_length=200)
    last_name = serializers.CharField(max_length=200)
    phone = serializers.CharField(max_length=20)
    email = serializers.EmailField()
    event_type = serializers.CharField(max_length=100)
    timestamp = serializers.DateTimeField()
    visit_type = serializers.ChoiceField(choices=['ems', 'inpatient', 'opd'])
    department = serializers.CharField(max_length=200)
    hospital_code = serializers.CharField(max_length=50)


class HISJourneyEventListSerializer(serializers.Serializer):
    """Serializer for list of HIS journey events"""
    events = HISJourneyEventSerializer(many=True)
