Hello All,
I am trying to use Json for complex structure.
I am able to create Json for simple structure with help of Json Raw and Auto but I am not sure how I will be able to implement below complex structure.
Below is the sample Json structure which I am trying to implement.
Another problem is, in our database, User information is storing along with Address in same table. If I will use Json Auto, it won't return data in another array inside User Array.
I also need information about how I can decode same structure back to normal table.
{
"remote_user": {
"display_name" : "string",
"phone_number" : "string",
"fax_number" : "string"
},
"request": {
"urgent": "boolean",
"form_id": "string",
"state": "STATE",
"memo": "string",
"User": {
"first_name": "required string",
"middle_name": "string",
"last_name": "required string",
"date_of_birth": "date",
"gender": "GENDER",
"email": "EMAIL",
"member_id": "string",
"pbm_member_id": "string",
"phone_number": "string",
"address": {
"street_1": "string",
"street_2": "string",
"city": "string",
"state": "STATE",
"zip": "zip"
}
},
"payer": {
"form_search_text": "string",
"bin": "bin",
"pcn": "string",
"group_id": "string",
"medical_benefit_name": "string",
"drug_benefit_name": "string"
},
"prescriber": {
"npi": "npi",
"first_name": "string",
"last_name": "string",
"clinic_name": "string",
"fax_number": "phone",
"phone_number": "phone",
"address": {
"street_1": "string",
"street_2": "string",
"city": "string",
"state": "STATE",
"zip": "zip"
}
},
"prescription": {
"drug_id": "required ndc or ddid",
"name": "string",
"strength": "string",
"frequency": "FREQUENCY",
"refills": "integer",
"dispense_as_written": "boolean",
"quantity": "decimal",
"days_supply": "decimal",
"quantity_unit_of_measure": "string",
"rationale": "string"
},
"pharmacy": {
"name": "string",
"fax_number": "phone",
"phone_number": "phone",
"address": {
"street_1": "string",
"street_2": "string",
"city": "string",
"state": "STATE",
"zip": "zip"
}
},
"enumerated_fields": {
"icd9_0": "ICD9",
"icd9_1": "ICD9",
"icd9_2": "ICD9",
"icd10_0": "ICD10",
"icd10_1": "ICD10",
"icd10_2": "ICD10",
"failed_med_0": "ndc or ddid",
"failed_med_1": "ndc or ddid",
"failed_med_2": "ndc or ddid",
"failed_med_3": "ndc or ddid",
"failed_med_4": "ndc or ddid",
"failed_med_5": "ndc or ddid",
"failed_med_6": "ndc or ddid",
"failed_med_7": "ndc or ddid",
"failed_med_8": "ndc or ddid",
"failed_med_9": "ndc or ddid"
}
}
}