Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The data is provided in a CSV file format. Each line represents a single dose of one of the four medicines and includes the following
The data is provided in a CSV file format. Each line represents a single dose of one of the four medicines and includes the following data:
A UUID of the patient
The patient's first and last names,
The patient's blood type A B AB or O
An datetime when the medication was administered in the ISO format so that it is lexicographically ordered
The medicine and dosage in mg
An example:
eaabebbffdaa,Tim,Carlson,AT::Xpensiv,
Patients can and will appear multiple times one for each dose of each medication they received We have provided code that loads up data files in this format in a data representation see the provided files
Report : Totals Report
Your first task is to produce a report of the total number of doses and total number of milligrams mg for each medication. Your report should look like the following.
Dose and Dosage Total Report
Nodiathol Kihpliva Xpensiv Playceibitol
Doses
Dosage
Report : Blood Type Counts
We need to verify how many unique patients are in the data and how many of each blood type we have for further research. Take care: the same patient identified by a UUID may appear many times in the data and should not be counted more than once for this report.
Your report should look like the following:
Blood Type Patient Total Report
A
B
AB
O
Total
Report : Bad Dosage Data Report
The data provided was compiled from several different sources, including data entered by medical professionals, some reported by patients and from inventory records. It is possible that dosages were reported incorrectly. For that reason, LSP Inc has compiled a second set of data and wants you to find any differences between the two data sets.
In the first data set the same one you used to produce the above reports for each record: find the record in the second data set identified by having the same patient UUID and datetime and report it if either the medicine or the dosage is different or if the record cannot be found in the second data set, report it as missing. Your report should look like the following and all data anomalies should be reported in order of patient by UUID then by date.
Bad Dosage Data Report:
Missing record:
Thomas, David cadaeafcfba AB Playceibitol mg on T::
Incorrect Dosage:
Long, April ecfcfbfd O Nodiathol mg on T::
Long, April ecfcfbfd O Nodiathol mg on T::
Missing record:
Sanders, Brandy facbbdafddfacf, O Xpensiv mg on T::
Incorrect Medicine:
Sanders, Brandy facbbdafddfacf, O Xpensiv mg on T::
Sanders, Brandy facbbdafddfacf, O Nodiathol mg on T::
Incorrect Dosage:
Anderson, Jeffrey ffadaeadcfbda O Nodiathol mg on T::
Anderson, Jeffrey ffadaeadcfbda O Nodiathol mg on T::
Incorrect Medicine:
Anderson, Jeffrey ffadaeadcfbda O Nodiathol mg on T::
Anderson, Jeffrey ffadaeadcfbda O Xpensiv mg on T::
Total Missing Patient Data records:
Total Incorrect Medicine records:
Total Incorrect Dosage records:
Take care: a naive, bruteforce approach will not work.
Instructions
Write a program that accepts two input files as command line arguments, processes the two files, and outputs the reports above to the standard output. Two input examples have been provided for you to troubleshoot and debug your program. Your output should provide the same information as the output in this handout, but the exact formatting does not need to match.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started