Skip to main content

API Integration

1. Authentication

Authenticate a user and retrieve an ID token using the login endpoint:
curl --request POST \
  --url 'https://prior-auth-api.claritycare.ai.claritycare.ai/v1/auth/login' \
  --header 'Content-Type: application/json' \
  --data '{
    "username": "your_username",
    "password": "your_password"
  }'
Response:
{
  "id_token": "eyJraWQiOiJrM1..."
}

2. Get Available Guidelines

Retrieve the list of available guidelines using the ID token:
curl --request GET \
  --url 'https://prior-auth-api.claritycare.ai/v1/guideline?guideline_name=A-0059%20-%20Lumbar%20Spine%20MRI' \
  --header 'Authorization: Bearer {cognito_login_token}'
Response:
{
  "guideline_code": "A-0059",
  "guideline_name": "A-0059 - Lumbar Spine MRI",
  "guideline_json": {...},
  "guideline_s3_path": "s3://guidelines/A-0059.json",
  "guideline_version": "1.0"
}

3. Submit Medical Records for Processing

Submit medical records for processing using the guideline ID: process_data_request_form is a json object that contains all payload fields as per the case table data model.
curl --request POST \
  --url 'https://prior-auth-api.claritycare.ai/v1/process' \
  --header 'Authorization: Bearer {cognito_login_token}' \
  --form 'process_data_request_form=<process_data_request_form>' \
  --form 'pdf_file=@/path/to/medical_record.pdf'
Response:
{
  "case_file_presigned_url": "https://s3.amazonaws.com/bucket/case_123abc.pdf",
  "final_results": {}
}

4. Check Processing Status

Poll the status endpoint using the process ID:
curl --request GET \
  --url 'https://prior-auth-api.claritycare.ai/v1/process/{run_id}' \
  --header 'Authorization: Bearer {cognito_login_token}'
Response:
{
  "result_presigned_url": "https://s3.amazonaws.com/bucket/result_123abc.json",
  "logs_presigned_url": "https://s3.amazonaws.com/bucket/logs_123abc.log",
  "case_file_presigned_url": "https://s3.amazonaws.com/bucket/case_123abc.pdf",
  "final_results": {
  "criteria": {
    "criteria_tree": {
      "criteria_id": "1",
      "description": "Procedure is indicated for ALL of the following:",
      "operator": "AND",
      "criteria": [
        {
          "criteria_id": "1.1",
          "description": "Intractable pain (eg. secondary to malignancy)",
          "parent_description": "Procedure is indicated for ALL of the following:",
          "color": "green",
          "clinical_decisioning": [
            {
              "bounding_box": [
                {
                  "x": 107.0,
                  "y": 249.6,
                  "width": 423.2,
                  "height": 11.6,
                  "page": 0
                }
              ],
              "id": "71b41cbe-3060-4aab-949c-ec05596ab1ba"
            }
          ]
        },
        {
          "criteria_id": "1.2",
          "description": "Pain believed to be amenable to percutaneous cordotomy",
          "parent_description": "Procedure is indicated for ALL of the following:",
          "color": "green",
          "clinical_decisioning": [
            {
              "exact_text_sentence_relevant_to_criteria": "Given the location and nature of the pain, the physician believes it may be amenable to percutaneous cordotomy, targeting specific pain pathways in the spinal cord for potential relief.",
              "bounding_box": [
                {
                  "x": 258.1,
                  "y": 337.9,
                  "width": 231.4,
                  "height": 11.3,
                  "page": 3
                }
              ],
              "id": "9eb3eac3-f867-4d73-bf07-22a416e64ab0"
            }
          ]
        },
        {
          "criteria_id": "1.3",
          "description": "Failure of nonoperative measures",
          "parent_description": "Procedure is indicated for ALL of the following:",
          "color": "green",
          "clinical_decisioning": [
            {
              "exact_text_sentence_relevant_to_criteria": "Standard interventions, including analgesics, neuropathic pain modulators, and percutaneous nerve blocks, have been attempted without success.",
              "bounding_box": [
                {
                  "x": 236.9,
                  "y": 410.7,
                  "width": 296.9,
                  "height": 11.7,
                  "page": 0
                }
              ],
              "id": "9fd6b7fe-fa7a-4523-9de0-b5108b16ae7d"
            }
          ]
        }
      ],
      "color": "green"
    },
    "clinical_rationale": "The procedure is certified as medically necessary based on intractable pain secondary to malignancy, amenability to percutaneous cordotomy, and failure of nonoperative measures.",
    "root_decision": "Certified",
    "ccm_trigger_detection": {
      "recent_visit_date": "11/18/2024",
      "ccm_status": "Yes",
      "trigger": "Cancer diagnosis",
      "trigger_details": [
        {
          "exact_evidence_text": "Diagnosed with metastatic pancreatic cancer, contributing to severe neuropathic pain.",
          "evidence_relevance": "Direct mention of a metastatic cancer diagnosis.",
          "page_number": 0
        }
      ],
      "reasoning": "The patient has metastatic pancreatic cancer causing severe, refractory neuropathic pain.",
      "intensity": "high"
    },
    "clinical_summary": {
      "patient_background": {
        "summary_content": "72 years old, female, metastatic pancreatic cancer, hypertension, osteoarthritis, type 2 diabetes, major depressive disorder",
        "evidence_content": [
          {
            "text": "Age: 72, Gender: Female, Diagnosed with metastatic pancreatic cancer",
            "page_index": 0
          }
        ]
      },
      "diagnosis": {
        "summary_content": "Metastatic pancreatic cancer, intractable neuropathic pain",
        "evidence_content": [
          {
            "text": "Diagnosed with metastatic pancreatic cancer, contributing to severe neuropathic pain",
            "page_index": 0
          }
        ]
      },
      "reason_for_request": {
        "summary_content": "Percutaneous cordotomy to alleviate intractable neuropathic pain",
        "evidence_content": [
          {
            "text": "Percutaneous cordotomy proposed to alleviate neuropathic pain",
            "page_index": 3
          }
        ]
      },
      "key_test_results": {
        "summary_content": "MRI and CT scans show stable pancreatic tumor with nerve involvement",
        "evidence_content": [
          {
            "text": "MRI (05/2024): Stable tumor in pancreas with nerve involvement",
            "page_index": 1
          }
        ]
      },
      "current_treatment": {
        "summary_content": "Opioid and non-opioid analgesics, neuropathic pain modulators with limited efficacy",
        "evidence_content": [
          {
            "text": "Combination of opioid and non-opioid analgesics with limited success",
            "page_index": 1
          }
        ]
      }
    }
  }
}
}

Web Application Access

Web application access is coming soon. Currently, all functionality is available through our API.

Future Access Roles

Nurse Portal

  • Dashboard overview
  • Case queue management
  • Medical record review

Admin Portal

  • System configuration
  • User management
  • Analytics dashboard

Guidelines Support

Electra™ supports various medical necessity guidelines:
Local Coverage Determinations (LCD) provide guidance for specific geographic areas
National Coverage Determinations (NCD) provide nationwide Medicare coverage guidance

Next Steps

Support

Need help getting started? Our support team is available to assist:
  • Email: [email protected]
  • Response Time: Within 24 hours
  • Support Hours: Monday - Friday, 9 AM - 5 PM EST