Getting Started

If you are a hospital and want to use our DeepSepsis APIs to detect and track Sepsis risks in your critical care departments, create your hospital infrastructure details as instructed below.

Sepsis Predict API

Deep Sepsis Algorithm uses a set of patient’s vitals, labs, medications, and existing medical conditions information in order to predict a risk score for sepsis. Ingesting this data has to follow a specific structure and order. 

If you are a hospital and want to use our Deep Sepsis APIs to track Sepsis in your critical care departments, create your hospital infrastructure details using the following APIs.

Sepsis Detect API

Sepsis detect API is used in order to detect the onset of Sepsis in any patient. The patient is subjected to meet the Sepsis criteria based on a set of clinically validated and pre-defined set of rules.The default Sepsis criteria met definition is clinically validated and being used at Duke University, North Carolina, United States. In order to detect sepsis using our Sepsis Detect API, follow the guidelines detailed below.

Create Hospital Infrastructure

To create and manage an organization and add details, use the Hospital API.

POST  https://deepsepsis.cohere-med.com/api/Organization

Request Body Syntax:
{
      "resourceType": "Organization",
        "active": true,
      "type": [
        {
          "coding": [
            {
              "system": "http://hl7.org/fhir/organization-type",
              "code": "Hospital",
              "display": "Great Plains Community Hospital"
            }
          ]
        }
      ],
      "name": "Great Plains Community Hospital"
    }
Response: 
Status: 201 Created
{
 "resourceType": "Organization",
 "id": "402",   //  ORGANIZATION ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T05:46:45.116+00:00"
 },
 "active": true,
 "type": [
   {
     "coding": [
       {
         "system": "http://hl7.org/fhir/organization-type",
         "code": "Hospital",
         "display": "Great Plains Community Hospital"
       }
     ]
   }
 ],
 "name": "Great Plains Community Hospital"
}
The Hospital API returns an Organization ID for the Organization/Hospital created which is used as a reference to create other resources.

In order to create and manage specific departments under an organization, use the Department APIs.

POST https://deepsepsis.cohere-med.com/api/Organization

Use the organization ID as a reference in the request body which essentially associates the department to an organization.

Request Body Syntax:
{
      "resourceType": "Organization",
      "active": true,
      "type": [
        {
          "coding": [
            {
              "system": "http://hl7.org/fhir/organization-type",
              "code": "Department",
              "display": "Emergency Department"
            }
          ]
        }
      ],
      "name": "Emergency Department",
      "partOf": {
        "reference": "Organization/402"  //ORGANIZATION ID
  }
  }
Response: 
{
 "resourceType": "Organization",
 "id": "403", //DEPARTMENT ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T05:58:38.655+00:00"
 },
 "active": true,
 "type": [
   {
     "coding": [
       {
         "system": "http://hl7.org/fhir/organization-type",
         "code": "Department",
         "display": "Emergency Department"
       }
     ]
   }
 ],
 "name": "Emergency Department",
 "partOf": {
   "reference": "Organization/402"
 }
}

The Department API’s POST method returns the Department ID for the created department. This step is repeated in order to create multiple departments under an organization.

Next step is to create beds in the department. This can be done by using the BED APIs.

POST https://deepsepsis.cohere-med.com/api/Location

Sample Request Body:
{
      "resourceType": "Location",
      "status": "active",
      "name": "Bed-ED-5",
      "type": [
        {
          "coding": [
            {
              "system": "http://hl7.org/fhir/location-physical-type",
              "code": "bed",
              "display": "Bed-ED-5"
            }
          ]
        }
      ],
      "managingOrganization": {
        "reference": "Organization/403" //DEPARTMENT ID 
      }
    }
Response: 
{
 "resourceType": "Location",
 "id": "404", // LOCATION ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T06:07:20.161+00:00"
 },
 "status": "active",
 "name": "Bed-ED-5",
 "type": [
   {
     "coding": [
       {
         "system": "http://hl7.org/fhir/location-physical-type",
         "code": "bed",
         "display": "Bed-ED-5"
       }
     ]
   }
 ],
 "managingOrganization": {
   "reference": "Organization/402"
 }
}
The Bed API’s POST method returns the Location ID for the created Bed. This step is repeated in order to create multiple beds under the department. 
Once we’ve got the infrastructure in place, Patients for the respective beds have to be created. This can be created and managed by the Patient APIs.

POST https://deepsepsis.cohere-med.com/api/Patient

Sample Request Body:
{
      "resourceType": "Patient",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueId": "race"
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueString": "WHITE"
        }
      ],
      "identifier": [
        {
          "type": {
            "coding": [
              {
                "id": "P_MRN",
                "code": "MRN",
                "display": "MRN"
              }
            ]
          },
          "value": "123427272"
        }
      ],
      "active": true,
      "gender": "Female",
      "birthDate": "1965-05-03",
      "managingOrganization": {
        "reference": "Organization/402"  //ORGANIZATION ID
      }
    }
Sample Response: 
 {
 "resourceType": "Patient",
 "id": "405",  //PATIENT ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T06:23:11.365+00:00"
 },
 "text": {
   "status": "generated",
   "div": "

Identifier 123427272
Date of birth 03 May 1965
"  },  "extension": [    {      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",      "valueId": "race"    },    {      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",      "valueString": "WHITE"    }  ],  "identifier": [    {      "type": {        "coding": [          {            "id": "P_MRN",            "code": "MRN",            "display": "MRN"          }        ]      },      "value": "123427272"    }  ],  "active": true,  "gender": "female",  "birthDate": "1965-05-03",  "managingOrganization": {    "reference": "Organization/402"  } }
The Patient API’s POST method returns the Patient ID for the created Patient. This step is repeated in order to create multiple Patients.
Episode of Care is defined as  an association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. To create  and manage existing episodes of care of patients, use the Episode of Care APIs. To create a new Episode of Care for a patient,

POST https://deepsepsis.cohere-med.com/api/EpisodeOfCare

Request Body Syntax:
{
      "resourceType": "EpisodeOfCare",
      "status": "active",
      "patient": {
        "reference": "Patient/405" //PATIENT ID
      },
      "managingOrganization": {
        "reference": "Organization/402" //ORGANIZATION ID
      }
    }
Sample Response: 
{
 "resourceType": "EpisodeOfCare",
 "id": "406", //EPISODE OF CARE ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T06:31:16.214+00:00"
 },
 "status": "active",
 "patient": {
   "reference": "Patient/405"
 },
 "managingOrganization": {
   "reference": "Organization/402"
 }
}
The Episode of Care API’s POST method returns the Episode of Care ID for the created resource. This step is repeated in order to create multiple Episodes of Care for multiple Patients.
Encounter is defined as an interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. Every admission into the organization is treated as a new encounter. To create new and manage encounters use the Encounter APIs.

POST https://deepsepsis.cohere-med.com/api/Encounter

Sample Request Body:
{
      "resourceType": "Encounter",
      "status": "arrived",
      "type": [
        {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "11429006",
              "display": "Triage"
            }
          ]
        }
      ],
      "priority": {
        "coding": [
          {
            "system": "http://snomed.info/sct",
            "code": "17621005",
            "display": "Emergency"
          }
        ]
      },
      "subject": {
        "reference": "Patient/405" //Link to PATIENT ID
      },
      "episodeOfCare": [
        {
          "reference": "EpisodeOfCare/406" //Link to EPISODE OF CARE ID
        }
      ],
      "period": {
        "start": "2020-09-14T09:10:55+05:30"
      },
      "location": [
        {
          "location": {
            "reference": "Location/404"  //Link to LOCATION ID
          },
          "status": "active",
          "period": {
            "start": "2020-05-27T09:10:55+05:30"
          }
        }
      ],
      "serviceProvider": {
        "reference": "Organization/402" //Link to ORGANIZATION ID
      }
    }
Sample Response: 
{
 "resourceType": "Encounter",
 "id": "407", //ENCOUNTER ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T06:43:29.366+00:00"
 },
 "status": "arrived",
 "type": [
   {
     "coding": [
       {
         "system": "http://snomed.info/sct",
         "code": "11429006",
         "display": "Triage"
       }
     ]
   }
 ],
 "priority": {
   "coding": [
     {
       "system": "http://snomed.info/sct",
       "code": "17621005",
       "display": "Emergency"
     }
   ]
 },
 "subject": {
   "reference": "Patient/405"
 },
 "episodeOfCare": [
   {
     "reference": "EpisodeOfCare/406"
   }
 ],
 "period": {
   "start": "2020-09-14T09:10:55+05:30"
 },
 "location": [
   {
     "location": {
       "reference": "Location/404"
     },
     "status": "active",
     "period": {
       "start": "2020-05-27T09:10:55+05:30"
     }
   }
 ],
 "serviceProvider": {
   "reference": "Organization/402"
 }
}
The Encounter API’s POST method returns the Encounter ID for the created resource. This step is repeated in order to create multiple Encounter for multiple Patients.

Ingesting Clinical Data

Now that the basic infrastructure and patient details are created in the database, Patient’s clinical observations have to be ingested. The Deep Sepsis model takes 86 such clinical parameters in order to compute a risk score. Details of the features can be found here.

To create and manage Vital observation for a patient, use the Observation APIs. Refer reference units, snomed CT codes for the vital observation here.

POST https://deepsepsis.cohere-med.com/api/Observation

Sample Request Body:
{
       "resourceType": "Observation",
         "tag": [
           {
             "code": "cm_vital",
             "display": "Observation"
           }
         ],
       "status": "final",
 "category": [
   {
     "coding": [
       {
         "system": "http://snomed.info/sct",
         "code": "260410005",
         "display": "Vital"
       }
     ]
   }
 ],
       "code": {
         "coding": [
           {
             "code": "cm_vital"
           }
         ]
       },
       "subject": {
         "reference": "Patient/402" //Link PATIENT ID
       },
       "encounter": {
         "reference": "Encounter/407" //Link ENCOUNTER ID
       },
       "effectiveDateTime": "2020-03-25T06:05:00+05:30",
       "component": [
   {
     "code": {
       "coding": [
         {
           "id": "vital.systolic",
           "system": "http://snomed.info/sct",
           "code": "163030003",
           "display": "Systolic (mm Hg)"
         }
       ]
     },
     "valueQuantity": {
       "value": 91,
               "unit":"(mm Hg)"
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "vital.diastolic",
           "system": "http://snomed.info/sct",
           "code": "163031004",
           "display": "Diastolic (mm Hg)"
         }
       ]
     },
     "valueQuantity": {
       "value": 56,
               "unit":"(mm Hg)"
   },
   {
     "code": {
       "coding": [
         {
           "id": "vital.heartrate",
           "system": "http://snomed.info/sct",
           "code": "364075005",
           "display": "Bpm"
         }
       ]
     },
     "valueQuantity": {
       "value": 73,
               "unit":"bpm"
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "vital.rrrate",
           "system": "http://snomed.info/sct",
           "code": "86290005",
           "display": "Respiratory Rate (bpm)"
         }
       ]
     },
     "valueQuantity": {
       "value": 16,
               "unit":"Bpm"
     }
   }
 ]
     }
Sample Response: 
{
 "resourceType": "Observation",
 "id": "408", //OBSERVATION ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T07:04:14.341+00:00"
 },
 "status": "final",
 "category": [
   {
     "coding": [
       {
         "system": "http://snomed.info/sct",
         "code": "260410005",
         "display": "Vital"
       }
     ]
   }
 ],
 "code": {
   "coding": [
     {
       "code": "cm_vital"
     }
   ]
 },
 "subject": {
   "reference": "Patient/405"
 },
 "encounter": {
   "reference": "Encounter/407"
 },
 "effectiveDateTime": "2020-09-14T20:05:00+05:30",
 "component": [
   {
     "code": {
       "coding": [
         {
           "id": "vital.systolic",
           "system": "http://snomed.info/sct",
           "code": "163030003",
           "display": "Systolic (mm Hg)"
         }
       ]
     },
     "valueQuantity": {
       "value": 91,
       "unit": "(mm Hg)"
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "vital.diastolic",
           "system": "http://snomed.info/sct",
           "code": "163031004",
           "display": "Diastolic (mm Hg)"
         }
       ]
     },
     "valueQuantity": {
       "value": 56,
       "unit": "(mm Hg)"
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "vital.heartrate",
           "system": "http://snomed.info/sct",
           "code": "364075005",
           "display": "Bpm"
         }
       ]
     },
     "valueQuantity": {
       "value": 73,
       "unit": "bpm"
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "vital.rrrate",
           "system": "http://snomed.info/sct",
           "code": "86290005",
           "display": "Respiratory Rate (bpm)"
         }
       ]
     },
     "valueQuantity": {
       "value": 16,
       "unit": "Bpm"
     }
   }
 ]
}
The Observation API’s POST method returns the ObservationID for the created Vital records. This step is repeated in order to create multiple Observation records for a Patient.
To create Lab observations for a Patient,

Step 1: Initiate a Service Request using the Service Request API

Step 2: Create Lab observations using the Observation API

Step 3: Create Diagnostic Report for the created Observations using the Diagnostic Report API

Service Request
Observations
Diagnostic Reports
Creating Service Requests:
A Service request has to be initiated in the system prior to ingesting  Lab observations. 

POST https://deepsepsis.cohere-med.com/api/ServiceRequest

Sample Request Body:
{
      "resourceType": "ServiceRequest",
      "status": "active",
      "intent": "original-order",
      "code": {
        "coding": [
          {
            "system": "http://snomed.info/sct",
            "code": "261904005"
          }
        ],
        "text": "Lab Tests"
      },
      "subject": {
        "reference": "Patient/405" //Link PATIENT ID
      },
      "encounter": {
        "reference": "Encounter/407" //Link ENCOUNTER ID
      },
      "occurrenceDateTime": "2020-09-15T09:45:00+05:30",
      "locationReference": [
        {
          "reference": "Location/404" // Link LOCATION ID
        }
      ],
      "reasonCode": [
        {
          "text": "Lab Tests"
        }
      ]
    }
Sample Response: 
Status: 201 Created
{
 "resourceType": "ServiceRequest",
 "id": "409", //SERVICE REQUEST ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T07:26:34.674+00:00"
 },
 "status": "active",
 "intent": "original-order",
 "code": {
   "coding": [
     {
       "system": "http://snomed.info/sct",
       "code": "261904005"
     }
   ],
   "text": "Lab Tests"
 },
 "subject": {
   "reference": "Patient/405"
 },
 "encounter": {
   "reference": "Encounter/407"
 },
 "occurrenceDateTime": "2020-09-15T09:45:00+05:30",
 "locationReference": [
   {
     "reference": "Location/404"
   }
 ],
 "reasonCode": [
   {
     "text": "Lab Tests"
   }
 ]
}

The Service Request API’s POST method returns the Service Request ID for the created request records. This step is repeated in order to create multiple Service requests for a Patient.

Creating Lab Observations:

Once the Service request has been placed, the lab observations are created and managed for a patient with reference to the request using the Observation API.

Refer  units, reference snomed CT codes for the Lab observations here.

POST https://deepsepsis.cohere-med.com/api/Observation

Sample Request Body:
{
 "resourceType": "Observation",
   "tag": [
     {
       "code": "cm_lab",
       "display": "Observation"
     }
   ]
 ,
 "status": "final",
 "category": [
   {
     "coding": [
       {
         "system": "http://snomed.info/sct",
         "code": "261904005",
         "display": "Laboratory"
       }
     ]
   }
 ],
 "code": {
   "coding": [
     {
       "code": "cm_lab"
     }
   ]
 },
 "subject": {
   "reference": "Patient/405" //Link PATIENT ID
 },
 "encounter": {
   "reference": "Encounter/407" //Link ENCOUNTER ID
 },
 "effectiveDateTime": "2020-03-24T10:40:00+05:30",
 "component": [
   {
     "code": {
       "coding": [
         {
           "id": "lab.albumin",
           "system": "http://snomed.info/sct",
           "code": "52454007",
           "display": "albumin"
         }
       ]
     },
     "valueQuantity": {
       "value": 2.2
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "lab.alt",
           "system": "http://snomed.info/sct",
           "code": "18307000",
           "display": "ALT"
         }
       ]
     },
     "valueQuantity": {
       "value": 15
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "lab.amm",
           "system": "http://snomed.info/sct",
           "code": "43953005",
           "display": "Ammonia"
         }
       ]
     },
     "valueQuantity": {
       "value": 27
     }
   }
 ]
}
Sample Response: 
Status: 201 Created
{
 "resourceType": "Observation",
 "id": "410", // OBSERVATION ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T07:35:37.207+00:00"
 },
 "status": "final",
 "category": [
   {
     "coding": [
       {
         "system": "http://snomed.info/sct",
         "code": "261904005",
         "display": "Laboratory"
       }
     ]
   }
 ],
 "code": {
   "coding": [
     {
       "code": "cm_lab"
     }
   ]
 },
 "subject": {
   "reference": "Patient/405"
 },
 "encounter": {
   "reference": "Encounter/407"
 },
 "effectiveDateTime": "2020-03-24T10:40:00+05:30",
 "component": [
   {
     "code": {
       "coding": [
         {
           "id": "lab.albumin",
           "system": "http://snomed.info/sct",
           "code": "52454007",
           "display": "albumin"
         }
       ]
     },
     "valueQuantity": {
       "value": 2.2
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "lab.alt",
           "system": "http://snomed.info/sct",
           "code": "18307000",
           "display": "ALT"
         }
       ]
     },
     "valueQuantity": {
       "value": 15
     }
   },
   {
     "code": {
       "coding": [
         {
           "id": "lab.amm",
           "system": "http://snomed.info/sct",
           "code": "43953005",
           "display": "Ammonia"
         }
       ]
     },
     "valueQuantity": {
       "value": 27
     }
   }
 ]
}

The Observation API’s POST method returns the Observation ID for the created Lab observations. This step is repeated in order to create multiple Lab records for a Patient.

Creating Diagnostic Reports:
A diagnostic report is the set of information that is typically provided by a diagnostic service when investigations are complete. Once the Lab observations are created for a patient, A diagnostic report has to be created, this can be done using the Diagnostic Report APIs

POST https://deepsepsis.cohere-med.com/api/DiagnosticReport

Sample Request Body:
{
       "resourceType": "DiagnosticReport",
       "basedOn": [
         {
           "reference": "ServiceRequest/409"  //LINK SERVICE REQUEST ID
         }
       ],
       "status": "final",
       "category": [
         {
           "coding": [
             {
               "system": "http://snomed.info/sct",
               "code": "4241000179101",
               "display": "Laboratory test report"
             }
           ]
         }
       ],
        "code": {
         "coding": [
          {
           "id": "lab.amm",
           "system": "http://snomed.info/sct",
           "code": "43953005",
           "display": "Ammonia"
         },
           {
           "id": "lab.alt",
           "system": "http://snomed.info/sct",
           "code": "18307000",
           "display": "ALT"
         },
      {
           "id": "lab.albumin",
           "system": "http://snomed.info/sct",
           "code": "52454007",
           "display": "albumin"
         }
         ]
       },
       "subject": {
         "reference": "Patient/405", //LINK PATIENT ID
         },
       "encounter": {
         "reference": "Encounter/407" //LINK ENCOUNTER ID
       },
       "issued": "2020-09-16T09:55:00+05:30",
       "performer": [
         {
           "reference": "Organization/402", //LINK ORGANIZATION ID
           "display": "Emergency Department"
         }
       ],
       "result": [
         {
           "reference": "Observation/410",
           "display": "Results for lab results"
         }
       ],
       "conclusion": "ALT,Ammonia and Albumin test done",
       "conclusionCode": [
         {
           "coding": [
             {
               "system": "http://snomed.info/sct",
               "code": "428763004",
               "display": "ALT,Ammonia and Albumin test done"
             }
           ]
         }
       ]
     }
Sample Response: 
Status: 201 Created
{
 "resourceType": "DiagnosticReport",
 "id": "411",  //DIAGNOSTIC REPORT ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T07:51:09.835+00:00"
 },
 "text": {
   "status": "generated",
   "div": "

Ammonia
Status FINAL
Issued 16 September 2020 04:25:00
Conclusion ALT,Ammonia and Albumin test done
"  },  "basedOn": [    {      "reference": "ServiceRequest/409"    }  ],  "status": "final",  "category": [    {      "coding": [        {          "system": "http://snomed.info/sct",          "code": "4241000179101",          "display": "Laboratory test report"        }      ]    }  ],  "code": {    "coding": [      {        "id": "lab.amm",        "system": "http://snomed.info/sct",        "code": "43953005",        "display": "Ammonia"      },      {        "id": "lab.alt",        "system": "http://snomed.info/sct",        "code": "18307000",        "display": "ALT"      },      {        "id": "lab.albumin",        "system": "http://snomed.info/sct",        "code": "52454007",        "display": "albumin"      }    ]  },  "subject": {    "reference": "Patient/405"  },  "encounter": {    "reference": "Encounter/407"  },  "issued": "2020-09-16T09:55:00+05:30",  "performer": [    {      "reference": "Organization/402",      "display": "Emergency Department"    }  ],  "result": [    {      "reference": "Observation/410",      "display": "Results for lab results"    }  ],  "conclusion": "ALT,Ammonia and Albumin test done",  "conclusionCode": [    {      "coding": [        {          "system": "http://snomed.info/sct",          "code": "428763004",          "display": "ALT,Ammonia and Albumin test done"        }      ]    }  ] }

The Diagnostic Report API’s POST method returns the Diagnostic Report ID for the created Lab observations. This step is repeated in order to create multiple Diagnostic Reports for the ingested Lab records for a Patient.

The next step is to add Patient’s history and current diagnosis. This can be created and further managed by using the Condition API.

Refer reference Snomed CT and codes for the conditions here.

POST https://deepsepsis.cohere-med.com/api/Condition

Sample Request Body:
{
 "resourceType": "Condition",
 "meta": {
   "tag": [
     {
       "code": "273849003",
       "display": "Baseline Covariates"
     }
   ]
 },
 "clinicalStatus": {
   "coding": [
     {
       "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
       "code": "active"
     }
   ]
 },
 "category": [
   {
     "coding": [
       {
         "system": "http://terminology.hl7.org/CodeSystem/condition-category",
         "code": "273849003",
         "display": "Baseline Covariates"
       }
     ]
   }
 ],
 "code": {
   "coding": [
     {
       "fhir_comments": [
         "Neuro disorder"
       ],
       "id": "condition.neuroother",
       "system": "http://snomed.info/sct",
       "code": "299735001",
       "display": "true"
     },
     {
       "fhir_comments": [
         "Lymphoma"
       ],
       "id": "condition.lymphoma",
       "system": "http://snomed.info/sct",
       "code": "118600007",
       "display": "true"
     }
   ]
 },
 "subject": {
   "reference": "Patient/405" //Link PATIENT ID
 },
 "encounter": {
   "reference": "Encounter/407" //Link ENCOUNTER ID
 },
"recordedDate": "2020-09-15T09:05:00+05:30"
}
Sample Response: 
Status: 201 Created
{
 "resourceType": "Condition",
 "id": "412", //CONDITION ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T08:03:34.520+00:00",
   "tag": [
     {
       "code": "273849003",
       "display": "Baseline Covariates"
     }
   ]
 },
 "clinicalStatus": {
   "coding": [
     {
       "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
       "code": "active"
     }
   ]
 },
 "category": [
   {
     "coding": [
       {
         "system": "http://terminology.hl7.org/CodeSystem/condition-category",
         "code": "273849003",
         "display": "Baseline Covariates"
       }
     ]
   }
 ],
 "code": {
   "coding": [
     {
       "fhir_comments": [
         "Neuro disorder"
       ],
       "id": "condition.neuroother",
       "system": "http://snomed.info/sct",
       "code": "299735001",
       "display": "true"
     },
     {
       "fhir_comments": [
         "Lymphoma"
       ],
       "id": "condition.lymphoma",
       "system": "http://snomed.info/sct",
       "code": "118600007",
       "display": "true"
     }
   ]
 },
 "subject": {
   "reference": "Patient/405"
 },
 "encounter": {
   "reference": "Encounter/407"
 },
 "recordedDate": "2020-09-15T09:05:00+05:30"
}
The Condition API’s POST method returns the Condition ID for the created Condition observations. This step is repeated in order to create multiple Conditions for an active Patient.
Next step is to essentially create Medication information for active patients. In order to create and manage Medication administration information,

Step 1: Create medication resources using Medication API.

Step 2: Create Medication request resources using Medication Request API.

Step 3: Create Medication Administration resources using Medication Administration API.

Create Medication Information:
Medication resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use. Refer reference Snomed CT codes for medication here.
Sample Request Body:
{
      "resourceType": "Medication",
      "meta": {
      },
      "code": {
        "coding": [
          {
            "code": "281789004" //SNOMED CT Code for Medication
          }
        ]
      },
      "manufacturer": {
        "reference": "Organization/402" //LINK ORGANIZATION ID
      }
}
Sample Response: 
Status: 201 Created

 "resourceType": "Medication",
 "id": "413",  //MEDICATION ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T08:16:28.474+00:00"
 },
 "text": {
   "status": "generated",
   "div": "
281789004
"  },  "code": {    "coding": [      {        "code": "281789004"      }    ]  },  "manufacturer": {    "reference": "Organization/402"  } }
The Medication API’s POST method returns the Medication ID for the created Medication records. This step is repeated in order to create multiple Medications for an active Patient.
Creating Medication Request Resources:
Medication request resource is essentially an order or request for both supply of the medication and the instructions for administration of the medication to a patient.

POST https://deepsepsis.cohere-med.com/api/MedicationRequest

Sample Request Body:
{
      "resourceType": "MedicationRequest",
      "status": "active",
      "intent": "order",
      "medicationReference": {
        "reference": "Medication/413" //LINK MEDICATION ID
      },
      "subject": {
        "reference": "Patient/405"
      },
      "encounter": {
        "reference": "Encounter/407", //LINK ENCOUNTER ID
        "display": "encounter who leads to this prescription"
      },
      "authoredOn": "2020-09-15"
    }
Sample Response: 
Status: 201 Created
{
 "resourceType": "MedicationRequest",
 "id": "414", //MEDICATION REQUEST ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T08:22:23.096+00:00"
 },
 "status": "active",
 "intent": "order",
 "medicationReference": {
   "reference": "Medication/413"
 },
 "subject": {
   "reference": "Patient/405"
 },
 "encounter": {
   "reference": "Encounter/407",
   "display": "encounter who leads to this prescription"
 },
 "authoredOn": "2020-09-15"
}
The Medication Request API’s POST method returns the Medication Request ID for the created Medication Request records. This step is repeated in order to create multiple Medication Requests for an active Patient.
Creating Medication Administration Resources:
The Medication administration resource describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. The Medication Administration API creates and manages these resources.

POST https://deepsepsis.cohere-med.com/api/MedicationAdministration

Sample Request Body:
{
      "resourceType": "MedicationAdministration",
      "meta": {
      },
      "status": "completed",
      "medicationReference": {
        "reference": "Medication/413" //Link MEDICATION ID
      },
      "subject": {
        "reference": "Patient/405" // Link PATIENT ID
      },
      "context": {
        "reference": "Encounter/407", //Link ENCOUNTER ID
        "display": "encounter who leads to this prescription"
      },
      "effectivePeriod": {
        "start": "2020-09-14T17:00:00+05:30"
      }
      ,
      "request": {
        "reference": "MedicationRequest/414" //LINK MEDICATION REQUEST ID
      }
}
Sample Response: 
Status: 201 Created
{
 "resourceType": "MedicationAdministration",
 "id": "415", // MEDICATION ADMINISTRATION ID
 "meta": {
   "versionId": "1",
   "lastUpdated": "2020-09-14T08:31:53.338+00:00"
 },
 "status": "completed",
 "medicationReference": {
   "reference": "Medication/413"
 },
 "subject": {
   "reference": "Patient/405"
 },
 "context": {
   "reference": "Encounter/407",
   "display": "encounter who leads to this prescription"
 },
 "effectivePeriod": {
   "start": "2020-09-14T17:00:00+05:30"
 },
 "request": {
   "reference": "MedicationRequest/414"
 }
}
The Medication Administration API’s POST method returns the Medication Administration ID for the created Medication Administration records. This step is repeated in order to create multiple Medication Administration for the created Medication records.

Predicting Sepsis Risk

Now that all the required features are in place, the Sepsis risk for the created Patients can be obtained using the Sepsis Predict API.

POST https://deepsepsis.cohere-med.com/api/predict

Headers: {“X-tennantID”: “coheremed.com”}

Sample Response: 
Status: 201 Created
{
   "response": [
       {
           "Encounter_ID": "32",
           "Patient_ID": "20",
           "SepsisRisk": 55.5, //SEPSIS RISK SCORE
           "endtime": "2020-09-17T12:18:37+05:30",
           "starttime": "2020-09-17T12:18:37+05:30"
       }
       ]
}

The Sepsis Predict API returns a list of risk scores for all the created patients computed by the Deep Sepsis engine. The Risk score ranges from 0 to 100, which quantifies the risk probability, 100 being the highest risk score.

Detecting Sepsis

To detect Sepsis in a patient, use the Sepsis criteria API.

POST https://deepsepsis.cohere-med.com/api/sepsiscriteria

Headers: {“X-tennantID”: “coheremed.com”}

Sample Response: 
 {
   "response": [
       {
           "Encounter_ID": "32",
           "Patient_ID": "20",
           "SepsisDetect": "1.0", //SEPSIS DETECT RESULT
           "endtime": "2020-09-17T12:45:44+05:30",
           "starttime": "2020-09-17T12:45:44+05:30"
       }
]
}
The Sepsis criteria API returns a list of criteria results for all the created patients computed by the Deep Sepsis engine. A score of “0” indicates that the Patient hasn’t met the Sepsis criteria and “1” likewise indicates that the Patient has met the Sepsis condition.

Ready to get started? Talk to an API expert on our team and tell us about your use case.