Operational Reporting Integration Point
Introduction
The Operational Reporting integration point processes a JSON input payload, performs necessary validations, and retrieves the relevant data for reporting. Once the validations are done then the query is run, and the results are sent as a JSON response. This IP logs any access to PHI data.
This IP accepts request to query reporting views only. Querying base views is not allowed.
Request
Operations
This IP supports the following operations:
POST /api/operationalreporting/query GET /api/operationalreporting/definition GET /api/operationalreporting/metadata
Payload
{ "columns": [ { "expr": "a.col1" }, { "expr": "b.col2" }, { "expr": "sum(c.col3)" }, { "expr": "substr(a.col2,1,1)", "alias": "initial" } ], "from": "view a", "joins": [ { "type": "inner", "object": "view2 b", "condition": "a.fk1_id=b.id" }, { "type": "left outer", "object": "view3 c", "condition": "a.fk2_id=c.id" }, { "type": "right outer", "object": "view4 d", "condition": "a.fk3_id=d.id" }, { "type": "full outer", "object": "view5 e", "condition": "a.fk4_id=e.id" } ], "where": "a.col2 > 'abc' and datecol > DATE '2024-02-15'", "groupBy": "c.col3", "orderBy": "a.col1 desc, b.col2 asc", "offset": 20, "fetchNext": 10 }
Response
If you do not have access to one or more reporting views included in the request, then HTTP 204 response is returned. |
Payload
{ "hasMore": false, "count": 25, "limit": 15, "offset": 3, "items": [ { "col1": "alpha", "col2": "beta", "sum(c.col3)": "125", "initial": "DR" }, { "col1": "gamma", "col2": "delta", "sum(c.col3)": "200", "initial": "MS" } ] }
Error Messages
Code |
Severity |
Message |
OHI-IP-ORV-001 |
Fatal |
From attribute is mandatory. |
OHI-IP-ORV-002 |
Fatal |
Type, object, and condition are mandatory for joins attribute. |
OHI-IP-ORV-003 |
Fatal |
Unsupported join type specified in joins attribute. |
OHI-IP-ORV-004 |
Fatal |
Expr is mandatory for columns attribute. |
OHI-IP-ORV-005 |
Fatal |
FetchNext should be greater than or equal to 0 and cannot be more than 200. |
OHI-IP-ORV-006 |
Fatal |
Invalid request. Potential SQL injection detected. |
OHI-IP-ORV-007 |
Fatal |
Offsets should be greater than or equal to 0. |
GEN-ORA-ERR |
Fatal |
DB/SQL exception. |
GEN-PROC-ERR |
Fatal |
Technical/unknown exceptions. |