Skip to content

Commit

Permalink
use UUIDField for uuids
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar committed Jul 20, 2023
1 parent 5d232c7 commit 54317da
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions care/abdm/api/serializers/healthid.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from rest_framework.serializers import CharField, Serializer
from rest_framework.serializers import CharField, Serializer, UUIDField


class AadharOtpGenerateRequestPayloadSerializer(Serializer):
Expand Down Expand Up @@ -61,13 +61,8 @@ class QRContentSerializer(Serializer):
required=True,
help_text="Name",
)
# {"statelgd":"33","distlgd":"573","address":"C/O Gopalsamy NO 33 A WESTSTREET ODANILAI KASTHURIBAI GRAMAM ARACHALUR Erode","state name":"TAMIL NADU","dist name":"Erode","mobile":"7639899448"}


# {
# "authMethod": "AADHAAR_OTP",
# "healthid": "43-4221-5105-6749"
# }
class HealthIdAuthSerializer(Serializer):
authMethod = CharField(
max_length=64,
Expand All @@ -83,12 +78,6 @@ class HealthIdAuthSerializer(Serializer):
)


# "gender": "M",
# "mobile": "9545812125",
# "name": "suraj singh karki",
# "yearOfBirth": "1994"


class ABHASearchRequestSerializer:
name = CharField(max_length=64, min_length=1, required=False, help_text="Name")
mobile = CharField(
Expand Down Expand Up @@ -132,9 +121,9 @@ class VerifyOtpRequestPayloadSerializer(Serializer):
help_text="Transaction ID",
validators=[],
)
patientId = CharField(
patientId = UUIDField(
required=False, help_text="Patient ID to be linked", validators=[]
) # TODO: Add UUID Validation
)


class VerifyDemographicsRequestPayloadSerializer(Serializer):
Expand Down Expand Up @@ -168,16 +157,6 @@ class VerifyDemographicsRequestPayloadSerializer(Serializer):
)


# {
# "email": "[email protected]",
# "firstName": "manoj",
# "healthId": "deepak.pant",
# "lastName": "singh",
# "middleName": "kishan",
# "password": "India@143",
# "profilePhoto": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkJCQkJCQoLCwoODw0PDhQSERESFB4WFxYXFh4uHSEdHSEdLikxKCUoMSlJOTMzOUlUR0NHVGZbW2aBeoGoqOIBCQkJCQkJCgsLCg4PDQ8OFBIRERIUHhYXFhcWHi4dIR0dIR0uKTEoJSgxKUk5MzM5SVRHQ0dUZltbZoF6gaio4v/CABEIBLAHgAMBIgACEQEDEQH/xAAbAAACAwEBAQAAAAAAAAAAAAACAwABBAUGB//aAAgBAQAAAADwawLpMspcK7qrlE5F0Vtul2bVywMUNeBHUkW/bmxvYELGuNjh2VDvixxo5ViljKjDRMoahCULjs2JCShjhjh2OGxo0Y2MoXHOLszsKLhw7tD99mpZQxj8xceofmLEKFwXLTIyHwY1Ls+iEotjHY0M0pjRYxtGj4VFKLPohQlFQyy4Qipc0XG9pS+CP/2Q==",
# "txnId": "a825f76b-0696-40f3-864c-5a3a5b389a83"
# }
class CreateHealthIdSerializer(Serializer):
healthId = CharField(
max_length=64,
Expand All @@ -193,6 +172,6 @@ class CreateHealthIdSerializer(Serializer):
help_text="PreVerified Transaction ID",
validators=[],
)
patientId = CharField(
patientId = UUIDField(
required=False, help_text="Patient ID to be linked", validators=[]
) # TODO: Add UUID Validation
)

0 comments on commit 54317da

Please sign in to comment.