Invoke Patient Query

post

/HSDataService-web/api/3.2.0/patientapi/patients/queries

This end point supports the retrieval of Links to Execution Status for checking Progress and to Access Results when the execution is done.

Request

Supported Media Types
  • application/json
  • application/xml
Body Parameter
Cohort Query Name,Creation Date,Retention Date Details for Patient
Root Schema : APIQueryRequest
Type: object
Nested Schema : OracleDBQueryDS
Type: object
Contains all the Query Criteria
Nested Schema : allCriteriaList
Type: array
Minimum Number of Items: 1
Maximum Number of Items: 2147483647
List of Criteria Eg.DemographicsCriteria,MedicationCriteria,DiagnosisCriteria,SequenceVariantsCriteria,ConsentCriteria,DiagnosisCriteria,EncounterCriteria,ObservationCriteria,HistoryCriteria,ProceduresCriteria,SpecimenCriteria,StudyCriteria,MicroarrayExpressionCriteria,RNASeqExpressionCriteria,CopyNumberVariationCriteria,RelativeTimeEventsCriteria
Nested Schema : criteria
Type: object
Discriminator: type

Response

Supported Media Types
  • application/json
  • application/xml
200 Response
successful operation
Body
Root Schema : /paths/~1patientapi~1patients~1queries/post/responses/200/schema
Type: array
Nested Schema : UriBuilder
Type: object
202 Response
Query accepted
400 Response
Invalid Parameters
406 Response
Failed to accept query

Examples

The following example submits a POST request. See the Criteria Classes for this endpoint.

API URL

http://localhost:7001/HSDataService-web/api/3.2.0/patientapi/patients/queries

Example of Request Body

The following example shows the contents of the request body in JSON format:

{
  "queryCriteria": {
    "allCriteriaList": [
      {
        "type": "ObservationCriteria",
        "observationCodeList": [
          "70443"
        ]
      },
      {
        "type": "ConsentCriteria",
        "consentTypeCodeList": [
          "70"
        ],
        "consentStatusCodeList": [
          "5"
        ]
      },
      {
        "type": "MedicationCriteria",
        "medicationCodeList": [
          "1114470"
        ],
        "medicationStartDateRange": {
          "value": "01/01/2020",
          "op": {
            "code": "COMP_OP_GE"
          }
        },
        "medicationEndDateRange": {
          "value": "01/31/2020",
          "op": {
            "code": "COMP_OP_LE"
          }
        },
        "medicationDosageRange": {
          "value": 88,
          "op": {
            "code": "COMP_OP_EQ"
          }
        },
        "dosageUOMCodeList": [
          "1001"
        ]
      },
      {
        "type": "DiagnosisCriteria",
        "diagnosisCodeList": [
          "N179"
        ]
      },
      {
        "type": "DemographicsCriteria",
        "genderNameList": [
          "FEMALE"
        ]
      },
      {
        "type": "MicroarrayExpressionCriteria",
        "geneInformation": {
          "type": "MicroarrayExpressionGeneDetails",
          "geneList": [
            "BID",
            "YWHAB",
            "AKT1",
            "PPP3R1",
            "BCL2",
            "PPP3CC",
            "BAD"
          ],
          "dnaAlignmentList": [
            "GRCh37"
          ]
        },
        "maxPValue": 0.9,
        "dualChannel": false,
        "intensityOperator": "<",
        "intensityAggregate": "AVG",
        "intensityFactor": 0.1,
        "aggregationMode": 1
      }
    ]
  }
}

Example of Response Body

The following example shows the contents of the response body in JSON format:

[
  {
    "rel": "status",
    "href": "/HSDataService-web/api/3.2.0/patientapi/patients/queries/986"
  },
  {
    "rel": "result",
    "href": "/HSDataService-web/api/3.2.0/patientapi/patients/queries/986/data"
  }
]