{
  "openapi": "3.0.0",
  "info": {
    "title": "Lotus AI API Documentation",
    "summary": "Human assisted AI for healthcare startups.",
    "description": "APIs available for clients to use. Please contact our team for more information. Colaboración. Convivencia. Perica.",
    "termsOfService": "https://intake.claimpower.com/terms/",
    "version": "0.1.0"
  },
  "paths": {
    "/api/404": {
      "get": {
        "description": "404 page",
        "responses": {
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/auth/token": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Get authentication token",
        "description": "Obtain an access token using client credentials",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "client_id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "API client ID"
          },
          {
            "in": "header",
            "name": "client_secret",
            "required": true,
            "schema": {
              "type": "string",
              "format": "password"
            },
            "description": "API client secret"
          },
          {
            "in": "header",
            "name": "claimpower_patient_id",
            "schema": {
              "type": "string"
            },
            "description": "Optional ClaimPower patient identifier"
          },
          {
            "in": "header",
            "name": "scope",
            "schema": {
              "type": "string"
            },
            "description": "Optional OAuth scopes (space-separated)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": {
                      "type": "string",
                      "description": "JWT access token"
                    },
                    "token_type": {
                      "type": "string",
                      "example": "Bearer"
                    },
                    "expires_in": {
                      "type": "integer",
                      "description": "Token expiration time in seconds"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing required credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Missing client_id or client_secret"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Authenticate using POST"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/userinfo": {
      "post": {
        "description": "Returns profile information for a logged in user exchanged from a token included in the headers",
        "responses": {
          "200": {
            "description": "valid token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sub": {
                      "type": "string",
                      "description": "the client id"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid token"
          },
          "405": {
            "description": "Invalid HTTP Method"
          }
        }
      }
    },
    "/api/callback": {
      "get": {
        "description": "Receives a payload from a FHIR Subcription",
        "headers": {
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "heart beat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/claimpower/billing/get_census_info": {
      "post": {
        "summary": "Request census information from Claimpower API",
        "responses": {
          "200": {
            "description": "List of patients with claimpower_patient_id for a facility and provider in Claimpower API",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "HTTP status code",
                      "example": 200
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data from Claimpower API"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/claimpower/billing/patient_search": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Search Claimpower & Medplum patients",
        "description": "Performs a search on the CLAIMPOWER API for patient billing information and a medplum search, combines the results and returns them\n",
        "parameters": [
          {
            "in": "header",
            "name": "token",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Medplum authentication token\n"
          },
          {
            "in": "query",
            "name": "SearchParam",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search parameter for patient lookup\n"
          },
          {
            "in": "query",
            "name": "org",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Medplum organization ID (format - Organization/{id})\n"
          },
          {
            "in": "query",
            "name": "identifier",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Identifier (format - dbname:ACTNO) for patient lookup\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "resourceType": {
                        "type": "string",
                        "enum": [
                          "Patient"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "MISSING TOKEN"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "INVALID TOKEN"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/claimpower/billing/patient": {
      "post": {
        "summary": "Returns medplum records, based on claimpower_patient_id and db_name.  If the patient is not found, it requests Data from Claimpower API and creates a new medplum patient record Request census information from Claimpower API, and creates medplum patient records",
        "responses": {
          "200": {
            "description": "List of patients,",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "HTTP status code",
                      "example": 200
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data from Claimpower API"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/claimpower/fhir": {
      "post": {
        "description": "Receives FHIR information and saves it in our medplum store",
        "headers": {
          "token": {
            "description": "the access token from from auth",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid token"
          }
        }
      }
    },
    "/api/claimpower/flag": {
      "put": {
        "description": "changes an existing flag"
      },
      "get": {
        "description": "retrieves existing flag for a claimpower_id"
      },
      "post": {
        "description": "Creates a new flag for a claimpower_id",
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/claimpower/forms/pdf/id": {
      "post": {
        "description": "Using a questionnaire responses id, it creates and returns a PDF file\n",
        "headers": {
          "token": {
            "description": "Bearer token",
            "required": false
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid id",
            "content": {
              "application/pdf": null
            }
          },
          "401": {
            "description": "Invalid token or id"
          }
        }
      }
    },
    "/api/claimpower/forms/pdf": {
      "post": {
        "description": "Receives a Questionnaire, QuestionnaireResponse.item and creates a PDF to forward to ClaimPower\nRequires a claimpower client_id patient_id and form_id\n",
        "headers": {
          "token": {
            "description": "Bearer token",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid token"
          }
        }
      }
    },
    "/api/claimpower/forms/upload": {
      "post": {
        "description": "[DEPRECATED] Receives File and Stores it in our S3 bucket,\n Creates a record in our Medplum Store with the URL associated\n It will later run the file thru our OCR to extract some data\nRequires a claimpower patient id and form id probably\n",
        "headers": {
          "token": {
            "description": "Bearer token",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid token"
          }
        }
      }
    },
    "/api/claimpower/patient_calls": {
      "get": {
        "description": "index endpoint for /api/claimpower/patient_calls",
        "responses": {
          "200": {
            "message": "Ceci n'est pas une API",
            "timestamp": "The result of Date.now in the server that is responding"
          }
        }
      }
    },
    "/api/claimpower/patient_calls/patient": {
      "post": {
        "descripton": "Creates a list of patients from claimpower_patient_ids"
      },
      "get": {
        "description": "Creates or retrieves a patient record for the user - by claimpower_patient_id, with additional metadata for editing",
        "parameters": [
          {
            "name": "user",
            "in": "query",
            "required": true,
            "description": "The user to query"
          },
          {
            "name": "claimpower_patient_id",
            "in": "query",
            "required": true,
            "description": "The dbname:patient_id combination to query"
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "description": "string with value release to release the patient"
          }
        ],
        "responses": {
          "200": {
            "patient": "The patient data if it already existed"
          },
          "201": {
            "patient": "The newly created patient data"
          },
          "409": {
            "message": "The patient is being edited by another user"
          }
        }
      }
    },
    "/api/claimpower/patient": {
      "post": {
        "description": "Receives FHIR information and saves it in our medplum store",
        "headers": {
          "token": {
            "description": "the access token from from auth",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid token"
          }
        }
      },
      "get": {
        "description": "Retrieves information from a patient",
        "headers": {
          "token": {
            "description": "the access token from from auth",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/claimpower/patient/ebill": {
      "post": {
        "summary": "Send eBill from Claimpower API",
        "description": "Sends an eBill using the Claimpower API",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "db_name": {
                    "type": "string",
                    "description": "Database connection string",
                    "example": "your_db_connection_string"
                  },
                  "claimpower_patient_id": {
                    "type": "string",
                    "description": "Claimpower patient ID",
                    "example": "12345"
                  },
                  "user": {
                    "type": "string",
                    "description": "User ID",
                    "example": "user123"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bill sent successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "HTTP status code",
                      "example": 200
                    },
                    "data": {
                      "type": "object",
                      "description": "Response data from Claimpower API"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "HTTP status code",
                      "example": 400
                    },
                    "error": {
                      "type": "string",
                      "description": "Error message",
                      "example": "Invalid request"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "HTTP status code",
                      "example": 500
                    },
                    "error": {
                      "type": "string",
                      "description": "Error message",
                      "example": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/claimpower/patient/get_form_url": {
      "post": {
        "description": "Receives a claimpower_patient_id and\nRequires a claimpower patient id and form id\nSends a URL that contains a secret the Patient can use to fill out a form\nSimilar to: forms/consent/[form_slug]/[claimpower_patient_id]/?secret=[secret]\n",
        "parameters": [
          {
            "in": "header",
            "name": "token"
          },
          {
            "in": "header",
            "name": "content-type"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "form_id": {
                    "type": "string"
                  },
                  "claimpower_patient_id": {
                    "type": "string"
                  },
                  "claimpower_db_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid token"
          }
        }
      }
    },
    "/api/claimpower/patient/get_ui_url": {
      "post": {
        "description": "Receives a claimpower_patient_id and\nRequires a claimpower component id patient id and db name and chart id\nSends a URL that contains a secret the Provider can use to add information to the patient\n"
      }
    },
    "/api/claimpower/patient/get": {
      "post": {
        "description": "Receives a claimpower_patient_id and db_name, fetches the data from Claimpower and stores in our Medplum\nFor additional safety, the response is a medplum id that can be used for future requests\n",
        "parameters": [
          {
            "in": "header",
            "name": "token"
          },
          {
            "in": "header",
            "name": "content-type"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claimpower_patient_id": {
                    "type": "string"
                  },
                  "claimpower_db_name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "medplum id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid token"
          }
        }
      }
    },
    "/api/claimpower/tests": {
      "post": {
        "description": "When given the correct parameters, it performs a series of tests to check the Claimpower API",
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "destination": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/claimpower/transfer/get_patient_info": {
      "get": {
        "summary": "Transfer patient data from Claimpower to Medplum",
        "tags": [
          "Patient Transfer"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "client_id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Client ID for Medplum"
          },
          {
            "in": "header",
            "name": "client_secret",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Client secret for Medplum"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful transfer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "TransferredPatient": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "DBName": {
                                "type": "string"
                              },
                              "PatientId": {
                                "type": "string"
                              },
                              "Medplum_PatientId": {
                                "type": "string"
                              },
                              "Medplum_PatientId_EntryDt": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing client_id or client_secret"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/claimpower/transfer/transfer_encounter": {
      "get": {
        "summary": "Transfer encounter data from Claimpower to Medplum",
        "tags": [
          "Encounter Transfer"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "client_id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Client ID for Medplum"
          },
          {
            "in": "header",
            "name": "client_secret",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Client secret for Medplum"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful transfer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "TransferredEncounter": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "DBName": {
                                "type": "string"
                              },
                              "PatientId": {
                                "type": "string"
                              },
                              "DOS": {
                                "type": "string"
                              },
                              "ENCStatus": {
                                "type": "string"
                              },
                              "Medplum_EncounterId": {
                                "type": "string"
                              },
                              "Medplum_EncounterId_EntryDt": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing client_id or client_secret"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/claimpower/ui/settings": {
      "get": {
        "description": "Return the existing User|Organization Settings. GET or POST",
        "parameters": [
          {
            "in": "headers",
            "name": "token"
          },
          {
            "in": "query",
            "name": "organization_id"
          }
        ],
        "responses": {
          "200": {
            "description": "User|Organization Settings"
          }
        }
      },
      "post": {
        "responses": {
          "401": {
            "description": "Saves the User|Organization settings into the ClientApplication"
          }
        },
        "description": "The prancing pony in Bree, headers:\n  claimpower_db_name: string\n  claimpower_patient_id: string\n  token:\n    description: Bearer token\n    required: true\n"
      }
    },
    "/api/claimpower/wrapper": {
      "post": {
        "description": "Forwards data to the CLAIMPOWER API, with additional security, debugging and translation features",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "claimpower_token": {
                    "type": "string",
                    "description": "The token for authentication."
                  },
                  "endpoint": {
                    "type": "string",
                    "description": "The endpoint to add patient call details.",
                    "example": "PatientCallScreen/AddPatientCallsDetails"
                  },
                  "data": {
                    "type": "object",
                    "description": "The data to be uploaded."
                  },
                  "db_name": {
                    "type": "string",
                    "description": "The database name."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "MISSING TOKEN",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "MISSING TOKEN"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "INVALID TOKEN",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "INVALID TOKEN"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/doc": {
      "get": {
        "description": "Returns swagger definitions for the api/docs page"
      }
    },
    "/api/echo/pulse": {
      "get": {
        "description": "Pulse",
        "parameters": [
          {
            "in": "query",
            "name": "message"
          }
        ],
        "responses": {
          "200": {
            "description": "Echo"
          }
        }
      },
      "put": {
        "description": "“If more of us valued food and cheer and song above hoarded gold, it would be a merrier world.”",
        "responses": {
          "201": {
            "description": "“Not all those who wander are lost.”"
          }
        },
        "headers": {
          "token": "“Never laugh at live dragons.”"
        }
      },
      "post": {
        "responses": {
          "401": {
            "description": "/aɪˈrɒnɪk/ · adjective"
          }
        },
        "description": "The prancing pony in Bree, headers:\n  client_id: string\n  client_secret: string\n  claimpower_patient_id: string\n  token:\n    description: Bearer token\n    required: false\n  content-type: 'application/json'\n"
      }
    },
    "/api/extensions/?name": {
      "get": {
        "description": "See extension definitions for FHIR Resources",
        "responses": {
          "200": {
            "description": "Returns a list of extensions or a single one when a name is provided"
          }
        }
      }
    },
    "/api/": {
      "get": {
        "description": "This is not an API",
        "responses": {
          "200": {
            "message": "Ceci n'est pas une API",
            "timestamp": "The result of Date.now in the server that is responding",
            "riddle": "A randomly selected riddle out of a short list of riddles"
          }
        }
      }
    },
    "/api/fhir/observation/": {
      "put": {
        "description": "Same as POST will replace the information, Observation[]"
      },
      "post": {
        "description": "Receives FHIR information and saves it in our medplum store, to create Observation[]",
        "headers": {
          "token": {
            "description": "the access token from from auth",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "observation id to PUT"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Resource"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid token"
          }
        }
      },
      "get": {
        "description": "Retrieves information from a resource",
        "headers": {
          "token": {
            "description": "the access token from from auth",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/fhir/patient/?id": {
      "get": {
        "description": "Retrieves FHIR Patient data with :id",
        "headers": {
          "token": {
            "description": "the access token from from auth",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "our lotus patient id"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/fhir/questionnaire/?id": {
      "put": {
        "description": "Same as POST will replace the information"
      },
      "post": {
        "description": "Receives FHIR information and saves it in our medplum store, to create Resources faster over JSON",
        "headers": {
          "token": {
            "description": "the access token from from auth",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Resource"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid token"
          }
        }
      },
      "get": {
        "description": "Retrieves information from a resource",
        "headers": {
          "token": {
            "description": "the access token from from auth",
            "required": true
          },
          "content-type": "application/json+fhir"
        },
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "the patient id"
                    },
                    "resourceType": {
                      "type": "string",
                      "description": "the resource type, in this case",
                      "value": "Patient"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/healthcheck": {
      "get": {
        "description": "See if server is alive and time of request",
        "responses": {
          "200": {
            "description": "I'm alive and the time is now"
          }
        }
      }
    },
    "/api/phasezero": {
      "post": {
        "parameters": [
          {
            "in": "headers",
            "name": "email"
          },
          {
            "in": "headers",
            "name": "tenantId"
          },
          {
            "in": "headers",
            "name": "password"
          }
        ],
        "responses": {
          "200": {
            "description": "Succesfully logged in to tenant ID"
          },
          "401": {
            "description": "Probably unauthorized"
          }
        },
        "description": "'That is one thing that Men call \"hope\",' said Finrod. Amdir we call it, \"looking up\". But there is another which is founded deeper. Estel we call it, that is \"trust.\" It is not defeated by the ways of the world, for it does not come from experience, but from our nature and first being.'\ncontent-type: 'application/json'\n"
      }
    },
    "/api/resources/?name": {
      "get": {
        "description": "See resource definitions for  Resources, valid options are Patient, ActivityDefinition, Questionnaire, Coverage, DocumentReference, QuestionnaireResponse",
        "responses": {
          "200": {
            "description": "Returns a list of extensions or details when a name is provided"
          }
        }
      }
    },
    "/api/resources/Patient": {
      "get": {
        "description": "Returns available definition information for Patient resources",
        "responses": {
          "200": {
            "description": "Attributes available to reference when creating a Patient"
          }
        }
      }
    },
    "/api/systems/?name": {
      "get": {
        "description": "See system definitions for value sets",
        "responses": {
          "200": {
            "description": "Returns a list of value sets or details about a value set once a name is provided"
          }
        }
      }
    },
    "/api/teapot": {
      "get": {
        "description": "Is not a coffee pot",
        "responses": {
          "418": {
            "description": "I'm a teapot"
          }
        }
      }
    },
    "/api/claimpower/redirect": {
      "post": {
        "description": "Creates a Claimpower URL we can redirect to. It sends debugging information to Datadog and offers some error fallbacks when missing parameters. This central point allows for more efficient changes in the future.",
        "parameters": [
          {
            "in": "header",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Appended to the base URL",
            "example": "/cpwebapps/connector.ashx"
          },
          {
            "in": "header",
            "name": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Query string parameters",
            "example": "userid=user&doctor=db_name&Acctno=12345&paytrannos=67890"
          }
        ],
        "responses": {
          "200": {
            "description": "valid token, valid data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "destination": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/og": {
      "post": {
        "description": "Using a questionnaire responses id, it creates and returns a PDF file\n",
        "params": {
          "title": {
            "description": "Title"
          },
          "content-type": "application/json"
        },
        "responses": {
          "200": {
            "description": "OG image to embed",
            "content": {
              "application/png": null
            }
          }
        }
      }
    }
  },
  "components": {},
  "tags": []
}