simulator

Simulator Upload

Changed on

Handles the simulator upload workflow for eICR refinement.

Steps:

  1. Obtain the simulator eICR ZIP file (either uploaded by user or from local sample in refiner/assets/demo/mon-mothma-covid-influenza.zip).
  2. Read and validate the XML files (eICR and RR) from the ZIP (XMLFiles object).
  3. Call the service layer (simulator) to orchestrate the refinement workflow.
  4. For each unique reportable condition code found in the RR (and having a configuration), build a refined XML document and collect metadata. The code used is the actual code from the RR that triggered the match, not a canonical or database code.
  5. Package all refined and original files into a ZIP.
  6. Upload the ZIP to S3 and get a download URL.
  7. Construct and return the response model for the frontend, including per-condition refinement results and a link to the ZIP of outputs.

Any exceptions during file processing or workflow execution are caught and mapped to HTTP errors.

post/api/v1/simulator/upload

Request

  • The document declares no server URL.
  • Auth
    none declared

Request body multipart/form-data

BodyUploadEcr required
body, string required
uploaded_file, string binary nullable

Response

Successful Response

SimulatorUploadResponse required

Model for the response when uploading a document in the simulate testing suite.

message, string required
refined_conditions_found, integer required
refined_conditions, Condition[] required
unrefined_eicr, string required
refined_download_key, string required
file_info_response, FileInfoResponse required

Utility class to help Orval ship these values to the frontend.

Changes