API description
API end-point | Response | Notes |
---|---|---|
/api/dcd/submissions/searching? organization-id={organizationId}; dcd-id={dcdId}; dcd-version-id={dcdVersionId} | See below for detailed response types | organization-id={organizationtId} : Id of the organization for which we want to search the DCD registrations submitted info. dcd-id={dcdId} : Id of the DCD we want to search the DCD registrations submitted info. <optional parameter> dcd-version-id={dcdVersionId} : If this parameter is not provided, latest one is assumed |
Search for submitted DCD registrations
Request example
GET /api/dcd/submissions/searching?organization-id={organizationId};dcd-id={dcdId};dcd-version-id={dcdVersionId}
Header:
MediaType.APPLICATION_JSON
Body:
{
"CD_SURGL_APPR_FEMO": {"BCOMP": "equals", "VALUE": 68224},
"D_IMPLANT": {"BCOMP": "gte", "VALUE": "2021-04-30T22:00:00"}
}
// conditional expression in the example above would be:
// CD_SURGL_APPR_FEMO = 68224 and D_IMPLANT >= "2021-04-30T22:00:00"
// (gte boolean comparator in the example means: greater than or equal to) See table below for details
// about rest of the boolean comparators.
Request parameters
- {organizationtId} : Id of the organization for which we want to search the DCD registrations submitted info.
- {dcdId} : Id of the DCD we want to search the DCD registrations submitted info.
- <optional parameter> {dcdVersionId} : Id of the DCD Version we want to search submitted info. If this parameter is not provided, lastest one is assumed.
Request payload
- {Header} : MediaType.APPLICATION_JSON
- {Body} : JSON object with the DCD searching criteria, following the specifications and examples in terms of data types and permitted values, provided by the described api end-points:
- GET /api/dcd/payload/definition
- GET /api/dcd/payload/example
And following searching rules specifications:
{
"FIELD_NAME": {"BCOMP": "gte", "VALUE": "example value 1"}
}
Valid boolean comparators (BCOMP):
(for the following examples purpose, we will use patients´s attributes (fields), for instance)
Filter | Query | Example | Description |
---|---|---|---|
equal | equals | "gender": {"BCOMP": "equals", "VALUE": "male"} | both return all submitted DCDs whose patients’ gender is male |
not equal | ne | "gender": {"BCOMP": "ne", "VALUE": "male"} | returns all submitted DCDs whose patients’ gender are not male |
greater than | gt | "age": {"BCOMP": "gt", "VALUE": "18"} | returns all submitted DCDs whose patients are older than 18 |
greater than or equal to | gte | "age": {"BCOMP": "gte", "VALUE": "18"} | returns all submitted DCDs whose patients are 18 and older |
less than | lt | "age": {"BCOMP": "lt", "VALUE": "30"} | returns all submitted DCDs whose patients are 29 and younger |
less than or equal to | lte | "age": {"BCOMP": "lte", "VALUE": "30"} | returns all submitted DCDs whose patients are 30 and younger |
in | in | "gender": {"BCOMP": "in", "VALUE": "female,male"} | returns all submitted DCDs whose patients’ gender are female and male |
nin | nin | "age": {"BCOMP": "nin", "VALUE": "18,21"} | returns all submitted DCDs whose patients are not 18 or 21 |
exists=true | exists | "age": {"BCOMP": "exists", "VALUE": "true"} | returns all submitted DCDs whose patients get some value in the age |
exists=false | exists | "age": {"BCOMP": "exists", "VALUE": "false"} | returns all submitted DCDs whose patients don’t get any value in the age |
Regex | regex | "username": {"BCOMP": "regex", "VALUE": "/^travis/i"} | returns all submitted DCDs whose patients’ username start with travis |
We’ll apply same query operators than in the Formio API, and in this way, its implementation will be straight forward. See this link for details about FormIO API: https://documenter.getpostman.com/view/684631/formio-api/2Jvuks#1f207caa-9d04-3e81-2973-e4bf82ee5190
Request response
If succeed result:
{
{
"TX_BUSINESS_KEY": "NISS 12.06.01-053.46 30/04/2021 67864"
"CD_SURGL_APPR_FEMO": 68224,
"D_IMPLANT": "2021-04-30T22:00:00",
"TX_TPE_INSTRU": "P-432",
"MS_PAT_HGHT": 160
},
{
"TX_BUSINESS_KEY": "NISS 68.06.01-053.29 04/05/2021 67864"
"CD_SURGL_APPR_FEMO": 68224,
"D_IMPLANT": "2021-05-04T22:00:00",
"TX_TPE_INSTRU": "X-333",
"MS_PAT_HGHT": 180
},
{
"TX_BUSINESS_KEY": "NISS 72.06.01-053.81 08/05/2021 67864"
"CD_SURGL_APPR_FEMO": 68224,
"D_IMPLANT": "2021-05-08T22:00:00",
"TX_TPE_INSTRU": "Z-345",
"MS_PAT_HGHT": 195
},
{
"TX_BUSINESS_KEY": "NISS 91.06.01-053.12 12/05/2021 67864"
"CD_SURGL_APPR_FEMO": 68224,
"D_IMPLANT": "2021-05-12T22:00:00",
"TX_TPE_INSTRU": "R-987",
"MS_PAT_HGHT": 170
},
}
If failed result:
{
"HTTP_STATUS_CODE": 405,
"HTTP_STATUS_NAME": "Method Not Allowed",
"HTTP_STATUS_EXCEPTION_DETAILS": "Exception details for Method Not Allowed example",
}