Skip to content

Commit

Permalink
Dev invalid messages (#100)
Browse files Browse the repository at this point in the history
* Added new endpoint details

* Added new endpoint details

* New endpoint for Direct and Indirect message counts

* Removed un-used binary file

* New endpoint for Direct and Indirect message counts

* Added days_interval in openapi spec

* New endpoint for Direct and Indirect message counts

* Updated open api spec

* Added filter to fetch failed records

* New endpoint for unfinished upload counts

* New endpoint for invalid message counts
  • Loading branch information
uil9 committed Apr 30, 2024
1 parent 76247cd commit ccd799c
Show file tree
Hide file tree
Showing 3 changed files with 312 additions and 33 deletions.
118 changes: 118 additions & 0 deletions docs/processing-status-openapi-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,124 @@ paths:
description: Bad request. The destination identifier provided was not found.
'401':
description: Authorization information is missing or invalid.
'/report/counts/totalUnfinishedUploads/{dataStreamId}':
get:
tags:
- DEX Status
summary: Report counts for the given criteria.
description: >-
Provides report counts for the given criteria.
parameters:
- name: dataStreamId
in: path
required: true
schema:
type: string
description: Filter by the data stream identifier to retrieve the report counts for.
- name: data_stream_route
in: query
required: true
schema:
type: string
description: Filter by the data stream route that was provided with the upload.
example: routineImmunization
- name: date_start
in: query
schema:
type: string
description: >-
Start date of filter. Format is YYYYMMDDTHHMMSSZ (UTC format,
inclusive). Defaults to 3 months prior to today.
example: 20231020T14103000Z
- name: date_end
in: query
schema:
type: string
description: >-
End date of filter. Format is YYYYMMDDTHHMMSSZ (UTC format,
exclusive). Defaults to today.
example: 20231030T14103000Z
- name: days_interval
in: query
schema:
type: string
description: >-
Number of days for which the query should be executed.
responses:
'200':
description: Report counts for the given criteria
content:
application/json:
schema:
type: object
properties:
unfinished_upload_counts:
type: string
query_time_millis:
type: string
'400':
description: Bad request. The destination identifier provided was not found.
'401':
description: Authorization information is missing or invalid.
'/report/counts/invalidMessage':
get:
tags:
- DEX Status
summary: Report counts for the given criteria.
description: >-
Provides report counts for the given criteria.
parameters:
- name: dataStreamId
in: query
required: true
schema:
type: string
description: Filter by the data stream identifier to retrieve the report counts for.
- name: data_stream_route
in: query
required: true
schema:
type: string
description: Filter by the data stream route that was provided with the upload.
example: routineImmunization
- name: date_start
in: query
schema:
type: string
description: >-
Start date of filter. Format is YYYYMMDDTHHMMSSZ (UTC format,
inclusive). Defaults to 3 months prior to today.
example: 20231020T14103000Z
- name: date_end
in: query
schema:
type: string
description: >-
End date of filter. Format is YYYYMMDDTHHMMSSZ (UTC format,
exclusive). Defaults to today.
example: 20231030T14103000Z
- name: days_interval
in: query
schema:
type: string
description: >-
Number of days for which the query should be executed.
responses:
'200':
description: Report counts for the given criteria
content:
application/json:
schema:
type: object
properties:
unfinished_upload_counts:
type: string
query_time_millis:
type: string
'400':
description: Bad request. The destination identifier provided was not found.
'401':
description: Authorization information is missing or invalid.
'/health':
get:
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,29 @@ public HttpResponseMessage getHL7DirectIndirectMessageCounts(
return new GetReportCountsFunction(request).getHL7DirectIndirectMessageCounts();
}

@FunctionName("GetUnfinishedUploadCounts")
public HttpResponseMessage GetUnfinishedUploadCounts(
@HttpTrigger(
name = "req",
methods = {HttpMethod.GET},
route = "report/counts/totalUnfinishedUploads/{dataStreamId}",
authLevel = AuthorizationLevel.ANONYMOUS
) HttpRequestMessage<Optional<String>> request,
@BindingName("dataStreamId") String dataStreamId) {
return new GetReportCountsFunction(request).getUnfinishedUploadCounts(dataStreamId);
}

@FunctionName("GetInvalidMessageCounts")
public HttpResponseMessage GetInvalidMessageCounts(
@HttpTrigger(
name = "req",
methods = {HttpMethod.GET},
route = "report/counts/totalInvalidMessageCounts",
authLevel = AuthorizationLevel.ANONYMOUS
) HttpRequestMessage<Optional<String>> request) {
return new GetReportCountsFunction(request).getInvalidMessageCounts();
}

@FunctionName("GetStatusByUploadId")
public HttpResponseMessage getStatusByUploadId(
@HttpTrigger(
Expand Down
Loading

0 comments on commit ccd799c

Please sign in to comment.