Register
Submit a solution
The challenge is finished.

Challenge Overview

CHALLENGE OBJECTIVES

In previous challenge, we build Outbound Mail Processor/API from scratch. Now we will extend it to support another workflow and do refactor.

PROJECT BACKGROUND

Wellmark is a health insurance company which has run dozens of projects already on Topcoder.

The objective of this project is to build Outbound Mail Processor/API for their Customer Interaction Management division.

Tech Stack

  • Typescript
  • Nodejs 12
  • NestJs
  • MongoDB

Individual Requirement

Refactor code (major)

  • In doFireEventPostalMailSentTask() in compdb.service.ts, it calls httpService.post to send requests to Event API, please create event-api client in another file to abstract this part. In doFireEventPostalMailSentTask, we should be able to call eventAPIClient.postEvent(body) to send event.
  • Same to doUploadToDmsTask() in compdb.service.ts, create DMS client and call dmsClient.upload
  • Remove samba-client. In processor, use nodejs fs instead. You are free to do the development with local path such as /mnt, but please write down how to prepare a UNC path such as \\127.0.0.1\\mnt\\ , and use it for verification.
  • Add finishedAt in Job, when the job is finished, fill in with the current date.

Update COMPDB (major)

In receiveFile() in COMPDB, it checks if there is a Pending Job exists. If the job exists, it followed the flow. Otherwise, it simply returns.

  • We need to update this part, if the job does not exist, and if the file is PDF file, we start the OMS OCR process.
  • We need to check if a CSV file with the same filename as PDF exists.
    • If not, log error and create a job with overallStatus is failure and completionStatus iscomplete, adding as much info we have in the job. Then finish the workflow.
    • if yes, the CSV file contains header and one row. The header definition could be found in the doc shared in the forum. The row includes information of recipient, please follow the doc to abstract data from CSV.
  • Create a job.
    • requestContext.source.system is "name": "OMS", "version": "1.0","stagingEnvironment": "{NODE_ENV}","datacenterEnvironment": "{DATACENTER_ENV}"
    • recipient has the info coming from CSV file
    • relationships, "type": "CONTENT-SOURCE", "conf": {"sourceSystemType": "OMS","formId": "B-9619649"}}. formId is from CSV file
    • created is from CSV
  • Follow the existing flow to continue
  • Please create oms-ocr service for logic of OMS OCR intake channel in another file and use the service in COMPDB

Important notes:

  • No unit tests are required


Final Submission Guidelines

Please submit the zip file containing the following:

  • Updated codebase in zip
  • README needs to be updated

ELIGIBLE EVENTS:

2020 Topcoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30119178