Wiki

Clone wiki

itk-payloads / childscreening / Parsing

Parsing a Child Screening CDA Document

Firstly, you will need to download the latest jar file from the downloads tab above, and put it in your classpath.

Now, you can take an XML Child Screening CDA document, and turn it into a set of java objects. First, create the overall ClinicalDocument object that you want to populate with data from the XML:

 
import java.util.Date;
import uk.nhs.interoperability.payloads.childscreeningv2.ClinicalDocument;
public class ChildScreeningDocumentParseTest {
	public static void main(String[] args) {
		ClinicalDocument doc = new ClinicalDocument();

Call the parse method, passing in your xml document:

		doc.parse(xml);

You can now call the relevant getters to get the values from the document:

		String documentID = doc.getDocumentId();
		Date dateOfBirth = doc.getChildPatient().getDateOfBirth().getDate();

Back

Updated