# Introduction

This document provides details of the json schema for ClaimMaker export.

# JSON Schema Export  ` "3894_513244_FACILITY_2023-01-17_MARTEL, BEATRICE A": {     "batch_id": <int>, //batch id in Claim Maker     "claim": [ //array of multiple claims/"line items". see Example (click here)       {         "box19": "",         "customField1": "",         "customField2": "",         "customField3": "",         "customField4": "",         "customField5": "",         "entities": [ // single entity represents a single line item [combination of CPT/ASA/ICD(s)/Modifier(s)/Practitioner]           {             "code": "12345", //string. the value for this entity             "order": 0, //int. the order of the value in the 'type' group             "type": "SurgCPT", //string. examples: SurgCPT/AnesCPT/ICD10/Modifier/Practitioner/PractitionerNPI             "unitValue": 0, //int. the ASA base unit value. only applies to type=='AnesCPT'           },  		…         ],         "order": 1, //int. order represents order of the line item in the claim from 1 to N       }, 	…     ],     "created_date": "2023-01-18", //YYYY-MM-DD     "date_of_service": "2023-01-17", //YYYY-MM-DD     "id": 513244, //internal ID     "meta": { 	"refURL": "https://claimmaker.hank.ai/app/code/batch/123/job/456", //direct url to open the case in HANK Claim Maker       "created": "2023-01-18 10:00:40", //YYYY-MM-DD HH:MM:SS. datetime case was created in Claim Maker       "entireTimeSpent": 62,       "hasDemographics": false,       "isDataEntered": false,       "isManuallyCreated": false,       "lastUpdated": "2023-01-21 20:00", //YYYY-MM-DD HH:MM:SS. datetime case was last modified in HANK Claim Maker       "lastUpdatedExport": "",       "schemaVersion": "2.0.3",       "source": "extractor",       "timeSpent": 36     },     "note": "", //any case-related information provided to or from revenue cycle personnel. this does NOT hold clinical notes or medical records.     "patient_full_name": "", //patient full name     "patient_info": {       "guarantor": {         "address": { //Example below           "city": "",           "state": "",           "street1": "",           "street2": "",           "zip": ""         },         "dob": "1986-06-04", //date of birth of guarantor. timestamp. YYYY-MM-DD         "email": "",         "employer": {           "address": {             "city": "",             "state": "",             "street1": "",             "street2": "",             "zip": ""           },           "name": "",           "phone": ""         },         "first": "",         "fullName": "",         "homePhone": "",         "language": "",         "last": "",         "maritalStatus": "",         "middle": "",         "mobilePhone": "",         "relationship": "",         "sex": "",         "ssn": "",         "workPhone": ""       },       "insurance": [ //list of insurance plans for the patient, in order, from primary through N         { 	    "insuranceID": "XXXXXXXXXXXXX",           "address": {             "city": "",             "state": "",             "street1": "",             "street2": "",             "zip": ""           },           "authorizationNumber": "",           "company": "",           "groupId": "",           "phone": "",           "plan": "",           "policyId": "",           "subscriber": {             "address": {               "city": "",               "state": "",               "street1": "",               "street2": "",               "zip": ""             },             "dob": "",             "email": "",             "employer": {               "address": {                 "city": "",                 "state": "",                 "street1": "",                 "street2": "",                 "zip": ""               },               "name": "",               "phone": ""             },             "first": "",             "fullName": "",             "homePhone": "",             "language": "",             "last": "",             "maritalStatus": "",             "middle": "",             "mobilePhone": "",             "relationship": "",             "sex": "",             "ssn": "",             "workPhone": ""           }         }       ],       "patient": {         "accn": "",         "address": {           "city": "",           "state": "",           "street1": "",           "street2": "",           "zip": ""         },         "dob": "", //YYYY-MM-DD. patient's date of birth         "email": "",         "employer": {           "address": {             "city": "",             "state": "",             "street1": "",             "street2": "",             "zip": ""           },           "name": "",           "phone": ""         },         "encn": "",         "first": "",         "fullName": "",         "homePhone": "",         "language": "",         "last": "",         "maritalStatus": "",         "middle": "",         "mobilePhone": "",         "mrn": "",         "primaryCareProvider": "",         "relationship": "",         "sex": "",         "ssn": "",         "workPhone": ""       }     },     "provider_correlation_id": "", //internal use     "provider_facility": "FACILITY",  //string. name of the facility where this encounter occurred     "schedule": {       "admitDate": "", //YYYY-MM-DD. date of admission to facility       "anType": "General", //string. primary anesthesia type. General/MAC/Spinal/etc       "anesthesiaStaff": [ //list of dicts of providers for the encounter. includes their role, name, start time, end time, and a flag for whether they were marked as the primary provider for the case or not         {           "endTime": "",//HH:MM. provider end time as appears on document           "isResponsibleProvider": true, //boolean. true/false. was this provider marked as the provider responsible for the case           "provider": "", //string. provider name           "providerNPI": "XXXXXX",           "role": "", //string. holds providers role, such as CRNA, SUPERVISING, MD, etc           "startTime": "" //HH:MM. provider start time as appears on document         }       ],       "asa": "", //string. ASA classification 1 through 6       "class": "",       "diagnosis": "", //string. short diagnosis description provided as rationale for surgical procedure       "difficultIntubation": true, //boolean. true/false,       "dischargeDate": "", //YYYY-MM-DD. date of discharge from facility       "emergent": false, //boolean. true/false,       "endTime": "",//HH:MM. anesthesia end time as appears on document       "procedure": "", //string. short surgical description       "recSigned": true, //boolean. was the medical record signed by a provider. true/false,       "room": "", //string. OR location room       "startTime": "", //HH:MM. anesthesia start time as appears on document       "surgeon": "" //string. surgeon name       "surgeonNPI": "XXXXXXX"     },     "state": "", //internal use. does NOT represent US states     "status": "", //internal use   }, //FUTURE CONSIDERATIONS [NOT SUPPORTED] - Case Documentation   "input": {       "entities_metadata": [         { 	    "text": "...", //Will contain text unless documentId is present which is located on S3           "textLength": <int>, //size of text           "noteType": "AnesProcNotes/AnesIntraop/AnesPostEval/AnesPreEval/BillingDetails"           "inputType": "json",           "documentId": "", //if not json, then will be pointing to s3 identifier           "noteHeader": "", //type of note           "inputSource": "extractor", //Internal use only           "userAttached": false, //internal use only           "lastModifiedTime": "" //string represents timestamp         },       …       ],       "documentId": "", //document home location       "dateDemographics": "" //string represents timestamp     } } `

## HOW TO Traverse the Claim Entities to Recreate the Claim

1. Iterate over the "claim" list to get a list of line item dictionaries

- Sort the list of line item dictionaries by value in the line item "order" key, ascending
- Iterate over the line item dictionaries
- Iterate over the entities and group them by "type" (SurgCPT, AnesCPT, …)
- Sort each group by the value in the entities "order" key, ascending
- Extract the "code" value for each entity

After doing the above, you'll have a list of line items that hold lists of the SurgCPT, AnesCPT, ICD10, Modifiers, and Practitioner with the values for each in order

# Example of Export with Values

`
&#123;
"3894_513244_FACILITY_2023-01-17_MARTEL, BEATRICE A": &#123;
    "batch_id": 3894,
    "documentIds": [\
        "hank-ai-clients:client.com/facility/processed/AnesIntraop_fj3489f.pdf",\
        "hank-ai-clients:client.com/facility/processed/MARTEL, B_01-17-2023.pdf",\
        "hank-ai-clients:client.com/facility/processed/MARTEL, B_facesheet.pdf"\
    ],
    "claim": [\
      &#123;\
        "box19": "",\
        "customField1": "1723703735",\
        "customField2": "XX404, 4256F, XX430, G2149",\
        "customField3": "",\
        "customField4": "",\
        "customField5": "",\
        "entities": [\
          &#123;\
            "code": "29880",\
            "order": 0,\
            "type": "SurgCPT",\
            "unitValue": 0\
          &#125;,\
          &#123;\
            "code": "01400",\
            "order": 0,\
            "type": "AnesCPT",\
            "unitValue": 4\
          &#125;,\
          &#123;\
            "code": "S83.242A",\
            "order": 0,\
            "type": "ICD10",\
            "unitValue": 0\
          &#125;,\
          &#123;\
            "code": "I50.1",\
            "order": 1,\
            "type": "ICD10",\
            "unitValue": 0\
          &#125;,\
          &#123;\
            "code": "59",\
            "order": 0,\
            "type": "Modifier",\
            "unitValue": 0\
          &#125;,\
          &#123;\
            "code": "Jim Smith, MD",\
            "order": 0,\
            "type": "Practitioner",\
            "unitValue": 0\
          &#125;,\
          &#123;\
            "code": "XXXXXX",\
            "order": 0,\
            "type": "PractitionerNPI",\
            "unitValue": 0\
          &#125;\
        ],\
        "order": 1\
      &#125;\
    ],
    "created_date": "2023-01-18",
    "date_of_service": "2023-01-17",
    "id": 513244,
    "meta": &#123;
      "created": "2023-01-18 10:00:40",
      "entireTimeSpent": 62,
      "hasDemographics": false,
      "isDataEntered": false,
      "isManuallyCreated": false,
      "lastUpdated": "2023-01-21 20:00",
      "lastUpdatedExport": "",
      "schemaVersion": "2.0.3",
      "source": "extractor",
      "timeSpent": 36
    &#125;,
    "note": "",
    "patient_full_name": "MARTEL, BEATRICE A",
    "patient_info": &#123;
      "guarantor": &#123;
        "address": &#123;
          "city": "BRANSON",
          "state": "WA",
          "street1": "51 BEAUREMONT DR",
          "street2": "",
          "zip": "67891"
        &#125;,
        "dob": "1986-06-04",
        "email": "beatriceemail at email.com",
        "employer": &#123;
          "address": &#123;
            "city": "BRANSON",
            "state": "WA",
            "street1": "ONE MEDICAL CENTER DRIVE",
            "street2": "",
            "zip": "29876"
          &#125;,
          "name": "SAMPLE MEMORIAL HOSPITAL",
          "phone": "+1 555-650-5000"
        &#125;,
        "first": "BEATRICE",
        "fullName": "MARTEL, BEATRICE A",
        "homePhone": "",
        "language": "",
        "last": "MARTEL",
        "maritalStatus": "SINGLE",
        "middle": "A",
        "mobilePhone": "+1 555-359-7465",
        "relationship": "SELF",
        "sex": "F",
        "ssn": "XXX-XX-9999",
        "workPhone": ""
      &#125;,
      "insurance": [\
        &#123;\
          "insuranceID": "XXXXXXXXXXXXX",\
          "address": &#123;\
            "city": "LONDON",\
            "state": "KY",\
            "street1": "ATTN: CLAIMS PROCESSING DEPT PO BOX 7387",\
            "street2": "",\
            "zip": "40742-7387"\
          &#125;,\
          "authorizationNumber": "",\
          "company": "AMERIHEALTH CARITAS MANAGED\nMEDICAID",\
          "groupId": "",\
          "phone": "+1 888-599-1479",\
          "plan": "AMERIHEALTH CARITAS NH",\
          "policyId": "98765678",\
          "subscriber": &#123;\
            "address": &#123;\
              "city": "",\
              "state": "",\
              "street1": "",\
              "street2": "",\
              "zip": ""\
            &#125;,\
            "dob": "1986-06-04",\
            "email": "",\
            "employer": &#123;\
              "address": &#123;\
                "city": "",\
                "state": "",\
                "street1": "",\
                "street2": "",\
                "zip": ""\
              &#125;,\
              "name": "",\
              "phone": ""\
            &#125;,\
            "first": "BEATRICE",\
            "fullName": "MARTEL, BEATRICE A",\
            "homePhone": "",\
            "language": "",\
            "last": "MARTEL",\
            "maritalStatus": "",\
            "middle": "A",\
            "mobilePhone": "",\
            "relationship": "SELF",\
            "sex": "",\
            "ssn": "",\
            "workPhone": ""\
          &#125;\
        &#125;\
      ],
      "patient": &#123;
        "accn": "",
        "address": &#123;
          "city": "BRANSON",
          "state": "WA",
          "street1": "51 BEAUREMONT DR",
          "street2": "",
          "zip": "67891"
        &#125;,
        "dob": "1986-06-04",
        "email": "beatriceemail at email.com",
        "employer": &#123;
          "address": &#123;
            "city": "BRANSON",
            "state": "WA",
            "street1": "ONE MEDICAL CENTER DRIVE",
            "street2": "",
            "zip": "29876"
          &#125;,
          "name": "MEMORIAL HOSPITAL",
          "phone": "+1 555-650-5000"
        &#125;,
        "encn": "",
        "first": "BEATRICE",
        "fullName": "MARTEL, BEATRICE A",
        "homePhone": "",
        "language": "",
        "last": "MARTEL",
        "maritalStatus": "SINGLE",
        "middle": "A",
        "mobilePhone": "+1 555-359-7465",
        "mrn": "98756987",
        "primaryCareProvider": "BRANSON FAMILY PRACTICE 555-448-3122",
        "relationship": "SELF",
        "sex": "F",
        "ssn": "XXX-XX-9999",
        "workPhone": ""
      &#125;
    &#125;,
    "provider_correlation_id": "hank-ai-clients:bluelakesolutions.com/facility/processed/DailyCases20230117.csv",
    "provider_facility": "FACILITY",
    "schedule": &#123;
      "admitDate": "",
      "anType": "general",
      "anesthesiaStaff": [\
        &#123;\
          "endTime": "15:54",\
          "isResponsibleProvider": true,\
          "provider": "WATKINS, MICHAEL R, CRNA",\
          "providerNPI": "XXXXXX",\
          "role": "CRNA",\
          "startTime": "14:43"\
        &#125;\
      ],
      "asa": "2",
      "class": "Hospital Outpatient Surgery",
      "diagnosis": "Chronic pain of left knee [M25.562, G89.29\nTear of medial meniscus of left knee, current, unspecified tear type, initial encounter [S83.242A",\
      "difficultIntubation": false,\
      "dischargeDate": "",\
      "emergent": false,\
      "endTime": "15:54",\
      "procedure": "ARTHROSCOPY WITH MENISCECTOMY, LAT.& MEDIAL WITH SHAVING  (WRVU 7.39) [29880], MODIFIER SMITH & NEPHEW ENDOSCOPY - FLOW 50 / WERE WOLF",\
      "recSigned": true,\
      "room": "OR 02",\
      "startTime": "14:43",\
      "surgeon": "HOUDE, JOHN P",\
"surgeonNPI": "XXXXXXX"\
    &#125;,\
    "state": "CodeCompleted",\
    "status": "OK"\
&#125;\
&#125;\
`\
\
There are two main use cases:\
\
Electronic Records\
\
- providerNPI, surgeonNPI, insuranceID: Hank.ai will maintain the IDs for Insurance, Provider \[NPI\], and Surgent \[NPI\] as available\
- User Experience: Electronic records should work as is today based on existing mapping\
\
\
Paper Records \[Mobile\]\
\
- providerNPI – hash ID that is constructed from the name\
- surgeonNPI – hash ID that is constructed from the name\
- insuranceID – hash ID that is facility name, company name, PO Box, Plan\
- User Experience: Initially mapping will have to be implemented at first.\
- Hank.ai: In about 10-12 weeks there should be a solution.\
\
\
[Claim Maker Export Options](/hank-claim-maker/guide/export-options)\
\
[Decoding Claim Maker Alert Emails](/hank-claim-maker/guide/decoding-claim-maker-alert-emails)\
\