Retrieve Subjects Count

post

/HSDataService-web/api/3.2.0/subjectapi/subjects/queries/count

This endpoint supports the retrieval of Count of Subjects by Query Name or Criteria.

Request

Supported Media Types
  • application/json
  • application/xml
Body Parameter
Cohort Query Name,Creation Date,Retention Date Details for Subject
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/~1subjectapi~1subjects~1queries~1count/post/responses/200/schema
Type: integer

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/subjectapi/subjects/queries/count

Example of Request Body

The following example shows the request sent in JSON format.

{
    "queryCriteria" : {
            "allCriteriaList" : [
           {
            "type" : "DiagnosisCriteria",
            "diagnosisCodeList": ["S280","M518","C9000","C9001","C900"]
           },
           {
        "type":"SequenceVariantsCriteria",
        "exclude":false,
        "radioOptionMode":"VARS_IN_GEN_REGION",
        "genomicPosition" : "CHR1:1,200,000-1,900,000",
        "genomicPositionAlignment" : "GRCh37",
        "variantTypesList":[
           {
              "variantType":"deletion"
           }
        ]
    },
           {
            "type" : "HistoryCriteria",
            "historyCodeList": ["9822","1937","1"]
           }
        ]
    }
}

Example of Response Body

The following example shows the response returned in JSON format.

3