1. From the file PatientsName.txt, load a dictionary of key-value pairs: ID (key), Name (value). Store the name as "last, first".
2. After adding the line of code to ignore the first line in the data file, to load the dictionary you will have to parse each line by finding the first and second spaces. (The spaces are shown here using yellow.)
FB2ABB23 Levy Cody
3. Having used the slice method to obtain the ID (0:8), the lastName (firstSpPos+1:secondSpPos), and the firstName (secondSpPos:), make the appropriate addition to the dictionary as follows:
ID_Names_dict[ID] = lastName + ', ' + firstName
4. Then use the strategy found on page 135 of the textbook to sort the dictionary by value (the names, in this case), and then write out the first ten to demonstrate that your code works properly. Sample output is shown below.
Part B
What is the name of a patient with a specific ID?
1. Use the dictionary you built in 13a above to help answer this question.
2. Write a code segment to find the patient name of the following IDs: 69CC25ED, C65A4ADE, 98F593D2. Also look up 11111111 which doesn't exist; the program should respond with "No patient with that ID.” Keep looking up patient names until “done” is entered as an ID.
The following strategy will guide the process:
# Strategy
# From the file PatientsName.txt, load a dictionary of ID, Name ("last, first") pairs
# prompt the user for an ID,
# use the ID to find the name in the dictionary
# terminate on ID of 'done'
# use the looping strategy on page 71 of the text book to solicit the ID (or "done")
Sample output is shown in the 13B screen shot.
Part C
What are the names (and IDs) of the patients with a diagnosis including the term “adrenal?”
The Diagnoses.txt file contains the patient ID, an admit ID, the ICD-10 code, and the diagnosis code textual description. Loop through the file, finding the lines containing the word “adrenal”. From that line, extract the ID. Then use the dictionary you created in 13a above to get the name.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme