USEPA / e-manifest

API services documentation and reference material for the e-Manifest hazardous waste tracking system
https://www.epa.gov/e-manifest
Creative Commons Zero v1.0 Universal
26 stars 22 forks source link

EM-2620 Search Service updates to facilitate electronic adoption #1612

Closed e-manifest closed 1 month ago

e-manifest commented 4 months ago

Search Service updates are needed to allow for more in-depth searching for electronic adoption. Users have been requesting the ability to pin point manifests based on information they have in their system as well as information from our system.

These updates are per user requests and focus on two areas

1-Signature Workflow

2- Tagging using the handler defined Label/Description key pairs:

The ultimate goal is to have these updates in the industry UI for the dashboard, bulk sign, and search pages. and afterwards updates to the UI link service.

Search Service Expanded:{color:#ff5630} ADDITIONS IN RED{color}

{  "stateCode":"string",  "siteId":"string",

{color:#ff5630}“submissionType“:”FullElectronic”|”Hybrid”|”Image”|”DataImage5Copy”{color} "status":"Pending|Scheduled|InTransit|ReadyForSignature|Signed|SignedComplete|UnderCorrection|Corrected",  "siteType":"Generator|Tsdf|Transporter|RejectionInfo_AlternateTsdf", {color:#ff5630}"transporterOrder":"integer",{color}

{color:#ff5630}"comments": [{{color}

{color:#ff5630} "label": "string",{color}

{color:#ff5630} "description": "string",{color}

{color:#ff5630} "handlerId": "string"{color}

{color:#ff5630} }],{color}

 "dateType":"CertifiedDate|ReceivedDate|ShippedDate|UpdatedDate|{color:#ff5630}QuickSignDate{color}",  "startDate":"date",  "endDate":"date"  "correctionRequestStatus":"NotSent|Sent|IndustryResponded|Cancelled

{color:#ff5630}"pageNumber":"number greater than 0"{color} }

{color:#ff5630}“submissionType“:”FullElectronic”|”Hybrid”|”Image”|”DataImage5Copy” {color}Can be found at RCRA_EMAN_EMAN_SUMMARY Submisson_Type

{color:#ff5630}"transporterOrder":"integer", {color}This is the transporter order on the manifest and is optional. Must be used with siteType Transporter. There will need to be an error if transporter is not the siteType

{color:#ff5630}"comments": [{{color}

{color:#ff5630} "label": "string",{color}

{color:#ff5630} "description": "string",{color}

{color:#ff5630} "handlerId": "string"{color}

{color:#ff5630} }],{color}

Covers Waste line and manifest level comments remind why an array using and

These can be found in RCRA_EMAN_HANDLER_COMMENTS which is connected to RCRA_EMAN_EMANIFEST and RCRA_EMAN_WASTE and ADDITIONAL_INFO_ID

The search is for the handler id that owns the label /description pair

The searches must be exact searches not fuzzy searches

(Please note: Anyone on manifest can ask for a Site ID and Label/Description pair: For example a TSDF enters truck number, but Transporter wants to sign on that truck number field)

{color:#ff5630}QuickSignDate{color} Not avail for signed complete, pending, corrected, under correction Provides the latest Quick Sign Date on the manifest.

Trimming should be added to the fields, if it is not standard. This is especially needed for the comments array

For all scenarios,

||Input||Expected Output|| |Electronic - {color:#ff5630}Submission Type{color} [^202b8fbe-7043-42d5-a025-ef97574b3af2] {code:json}{ "stateCode":"VA", "siteId":"VATEST000003", "submissionType":"FullElectronic", "status":"Scheduled", "dateType":"UpdatedDate", "siteType":"Generator", "startDate":"2024-05-13T12:00:00.000-0000", "endDate":"2024-05-14T12:05:00.000-0000" }{code}|{code:json}[ "100037512ELC", "100037517ELC", "100037518ELC", "100037515ELC", "100037511ELC", ]{code}| |Hybrid - {color:#ff5630}Submission Type & Transporter order{color} [^b07c950e-4467-4da0-a411-8a6f3efe6448] {code:json}{ "stateCode":"VA", "siteId":"VAR000503912", "submissionType":"Hybrid", "status":"Scheduled", "dateType":"UpdatedDate", "siteType":"Transporter", "transporterOrder":1, "startDate":"2024-05-14T12:00:00.000-0000", "endDate":"2024-05-14T12:07:00.000-0000" }{code}|{code:json}[ "100037513ELC", "100037521ELC" ]{code}| |Hybrid - {color:#ff5630}Transporter order{color} (Same JSON as above, after signing for transporter 1) {code:json}{ "stateCode":"VA", "siteId":"VAD000532119", "submissionType":"Hybrid", "status":"InTransit", "dateType":"UpdatedDate", "siteType":"Transporter", "transporterOrder":2, "startDate":"2024-05-14T12:00:00.000-0000", "endDate":"2024-05-14T12:07:00.000-0000" }{code}|{code:json}[ "100037514ELC", "100037519ELC" ]{code}| |Paper+data - {color:#ff5630}Submission Type{color} [^0a4f12a4-b41b-4634-a737-df385ab64738] {code:json}{ "stateCode":"VA", "siteId":"VAR000503920", "submissionType":"DataImage5Copy", "status":"ReadyForSignature", "dateType":"ReceivedDate", "siteType":"Tsdf", "startDate":"2024-05-13T11:00:00.000-0000", "endDate":"2024-05-14T13:07:00.000-0000" }{code}|{code:json}[ "879405137JJK", "879405132JJK", "185143510FLE" ]{code}| |Paper only- {color:#ff5630}Submission Type{color} [^a94fce99-b188-4b6e-8d61-1feb1bf6a50a] {code:json}{ "stateCode":"VA", "siteId":"VATEST000003", "submissionType":"Image", "status":"ReadyForSignature", "dateType":"UpdatedDate", "siteType":"Generator", "startDate":"2024-05-13T11:00:00.000-0000", "endDate":"2024-05-14T13:07:00.000-0000" }{code}|{code:json}[ "879405138JJK", "879405135JJK", ]{code}| |Electronic - {color:#ff5630}Transporter order - {color}(x) {code:json}{ "stateCode":"VA", "siteId":"VATEST000003", "submissionType":"FullElectronic", "status":"Scheduled", "dateType":"UpdatedDate", "siteType":"Generator", "transporterOrder":1, "startDate":"2024-05-14T12:00:00.000-0000", "endDate":"2024-05-14T12:05:00.000-0000" }{code}|{code:json} "errors": [ { "field": "Emanifest.transporter.order", "message": "siteType must be Transporter" }{code}| |Electronic - {color:#ff5630}Additional Info{color} [^Electronic_additionalinfo.json] {code:json}{ "stateCode":"VA", "siteId":"VATEST000003", "submissionType":"FullElectronic", "status":"Scheduled", "comments": [{ "label": "Railcar Number", "description": "123testing", "handlerId": "VAR000503920" }], "dateType":"UpdatedDate", "siteType":"Generator", "startDate":"2024-05-14T20:00:00.000-0000", "endDate":"2024-05-14T20:12:00.000-0000" }{code}|{code:json}[ "100037517ELC", ]{code}| |Paper+data - {color:#ff5630}Additional Info{color} [^Paperdata_additionalinfo.json] {code:json}{ "stateCode":"VA", "siteId":"VATEST000003", "submissionType":"DataImage5Copy", "status":"Signed", "comments": [{ "label": "Person Assigned To", "description": "Steve Tester", "handlerId": "VAR000503920" }], "dateType":"UpdatedDate", "siteType":"Generator", "startDate":"2024-05-14T21:00:00.000-0000", "endDate":"2024-05-14T21:25:00.000-0000" }{code}|{code:json}[ "879405144JJK", ]{code}| |Electronic - {color:#ff5630}QuickSign (Generator - Scheduled){color} (Same JSON as Electronic Submission.json, after quick signing for Generator) {code:json}{ "stateCode":"VA", "siteId":"VATEST000003", "submissionType":"FullElectronic", "status":"Scheduled", "dateType":"QuickSignDate", "siteType":"Generator", "startDate":"2024-05-13T12:15:00.000-0000", "endDate":"2024-05-14T12:30:00.000-0000" }{code}|{code:json}[ "100037512ELC", "100037517ELC", "100037518ELC", "100037515ELC", "100037511ELC", ]{code}| |Hybrid- {color:#ff5630}QuickSign (Transporter, In Transit){color} (Same JSON as Electronic Submission.json, after quick signing for Generator and Transporter) {code:json}{ "stateCode":"VA", "siteId":"VAR000503912", "submissionType":"Hybrid", "status":"InTransit", "dateType":"QuickSignDate", "siteType":"Transporter", "transporterOrder":1, "startDate":"2024-05-13T12:30:00.000-0000", "endDate":"2024-05-14T12:45:00.000-0000" }{code}|{code:json}[ "100037514ELC", "100037519ELC" ]{code}| |Hybrid- {color:#ff5630}QuickSign (Transporter, Ready for Signature){color} (Same JSON as Electronic Submission.json, after quick signing for Generator and Transporter) {code:json}{ "stateCode":"VA", "siteId":"VAD000532119", "submissionType":"Hybrid", "status":"ReadyForSignature", "dateType":"QuickSignDate", "siteType":"Transporter", "transporterOrder":2, "startDate":"2024-05-13T12:30:00.000-0000", "endDate":"2024-05-14T12:45:00.000-0000" }{code}|{code:json}[ "879405137JJK", "879405132JJK" ]{code}| |Electronic - {color:#ff5630}QuickSign (Generator - Under Correction) - {color}(x) (Same JSON as Electronic Submission.json, after cromerr signing to signed-complete and placing under correction) {code:json}{ "stateCode":"VA", "siteId":"VATEST000003", "submissionType":"FullElectronic", "status":"UnderCorrection", "dateType":"QuickSignDate", "siteType":"Generator", "startDate":"2024-05-13T12:25:00.000-0000", "endDate":"2024-05-14T12:40:00.000-0000" }{code}|{code:json}{ "errors": [ { "field": ".dateType", "message": "Instance value (UnderCorrection) does not have the dateType option QuickSignDate (the correct values are: [CertifiedDate, ReceivedDate, ShippedDate, and UpdatedDate])", "value": "QuickSignDate" } ] }{code}|

Acceptance Criteria
Add the following parameters to the services Search call:

(x) Add {color:#ff5630}“submissionType“:”FullElectronic”|”Hybrid”|”Image”|”DataImage5Copy”{color}

(x) Add {color:#ff5630}"transporterOrder":"integer",{color}

(x) Only accept "transporterOrder":"integer", if siteType = “Transporter”, otherwise produce error such as:

{code:json}"errors": [ { "field": "Emanifest.transporter.order", "message": "siteType must be Transporter" }{code}

(x) Add {color:#ff5630}"comments": [{{color}

{color:#ff5630}"label": "string",{color}

{color:#ff5630}"description": "string",{color}

{color:#ff5630}"handlerId": "string"{color}

{color:#ff5630}}],{color}

(x) When requesting “comments”, all fields must be included: label, description, and handlerId

(x) Identify comments based on the handler ID attached to the label/description

(x) Add {color:#ff5630}QuickSignDate {color}to dateType, only accepting the value when status = “Scheduled”, “InTransit”, “ReadyforSignature”, or “Signed”

(x) QuickSignDate will not be an accepted parameter if “status” = “Pending”, “Signed-Complete”, “UnderCorrection”, or “Corrected”

(x) Add {color:#ff5630}pageNumber {color}where the value must be greater than 0