Homework Assignment
Exchange of information among healthcare organizations is a very important problem facing the healthcare industry at this time. There are a number of efforts ongoing to solve the various difficulties. Information can arrive at a healthcare organization in different formats. The FHIR (Fast Healthcare Interoperability Resources) project, being conducted by the Health Level Seven International (HL7) organization, uses several standards, such as XML (Extensible Markup Language), for exchanging information. Parsing the information stream coming into the organization is necessary to extract the relevant information.
For the assignment, you need to modify the given parser program to work with your PatientBill Class created in Assignment #4. The final program should be able to extract the 4 types of information for each patient, first prints out the total number of people listed in the file, and then prints the information for each person out to the screen with labels.
Please note that there are 4 individuals in the file given to you, which is called Patient.xml in the My Course Content area. However, your program should be general enough that it can handle any number of individuals in the file (so, I may test your Java code using a test file that contains a different number and list of people).
For the assignment, you need to submit both your Java source code ( and and the screen output that resulted when you ran the program. Remember to include comments in the source code to explain what the code is doing.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

import java.util.ArrayList;
import java.util.Iterator;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

* Class to parse PatientBill objects from XML file
public class PatientBillParser
    private ArrayList<PatientBill> patients;
    private Document dom;
    // Constructor
    public PatientBillParser()
       patients = new ArrayList<PatientBill>();
    // Method to run example
    public void runExample()
       //parse the xml file and get the dom object
       //get each patient element and create a PatientInfo object
       //Iterate through the list and print the data
    // Method to parse XML file
    private void parseXMLFile()
       DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            dom = db.parse("Patient.xml");
       }catch(ParserConfigurationException pce)
       }catch(SAXException se)
       }catch(IOException ioe)
    // Method to parse document
    private void...

By purchasing this solution you'll be able to access the following files:

50% discount

$50.00 $25.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Bioinformatics Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats