Home Reference Source Repository

<h2>CredSimple Code Challenge</h2>

Part 2

Description: Every organization in healthcare stores their data a little bit differently, but when they export it or share it, they do so in flat files. Because we are organizing and standardizing much of this data into one central place, one of CredSimple's challenges is handling all of the different file/data formats we receive.

Instructions: In your language of choice, write a program to first assemble a single set of records by parsing data from 3 different file formats, and then display these records sorted in 3 different ways.

A record consists of the following 5 fields: last name, first name, gender, date of birth and provider type. This project folder contains 3 files, each containing records stored in a different format.

The pipe-delimited file record format:<br> LastName|FirstName|MiddleInitial|Gender(M/F)|ProviderType|DateOfBirth(M-D-YY)

The comma-delimited file record format:<br> LastName,FirstName,Gender(Male/Female),ProviderType,DateOfBirth(M/D/YYYY)

The space-delimited file record format:<br> LastName FirstName MiddleInitial Gender(M/F) DateOfBirth(M-D-YYYY) ProviderType

You may assume that the delimiters (commas, pipes and spaces) do not appear anywhere in the data values themselves.

Display Requirements: Create and display 3 different outputs of the records:

  1. sorted by provider type then by last name ascending.<br>
  2. sorted by birth date, ascending.<br>
  3. sorted by last name, descending.<br>

Ensure that fields are displayed in the following order: last name, first name, gender, date of birth, provider type. Display dates in the format MM/DD/YYYY.