Last change
on this file since 507 was 507, checked in by George Lilly, 15 years ago |
NHIN gateway and adaptor for use on linux with VistA EHR and RPMS
|
File size:
1.5 KB
|
Rev | Line | |
---|
[507] | 1 | /*
|
---|
| 2 | * To change this template, choose Tools | Templates
|
---|
| 3 | * and open the template in the editor.
|
---|
| 4 | */
|
---|
| 5 | package gov.hhs.fha.nhinc.patientcorrelationservice.parsers.PRPAIN201303UV;
|
---|
| 6 |
|
---|
| 7 | import java.util.List;
|
---|
| 8 | import org.apache.commons.logging.Log;
|
---|
| 9 | import org.apache.commons.logging.LogFactory;
|
---|
| 10 | import org.hl7.v3.PRPAIN201303UV;
|
---|
| 11 | import org.hl7.v3.PRPAIN201303UVMFMIMT700701UV01Subject1;
|
---|
| 12 | import org.hl7.v3.PRPAMT201305UVPatient;
|
---|
| 13 |
|
---|
| 14 | /**
|
---|
| 15 | *
|
---|
| 16 | * @author svalluripalli
|
---|
| 17 | */
|
---|
| 18 | public class PRPAIN201303UVParser {
|
---|
| 19 |
|
---|
| 20 | private static Log log = LogFactory.getLog(PRPAIN201303UVParser.class);
|
---|
| 21 |
|
---|
| 22 | public static PRPAMT201305UVPatient parseHL7PatientPersonFrom201303Message(PRPAIN201303UV message) {
|
---|
| 23 | if (message == null) {
|
---|
| 24 | return null;
|
---|
| 25 | }
|
---|
| 26 | List<PRPAIN201303UVMFMIMT700701UV01Subject1> subject1s = message.getControlActProcess().getSubject();
|
---|
| 27 | PRPAMT201305UVPatient patient = null;
|
---|
| 28 | if (subject1s == null) {
|
---|
| 29 | return null;
|
---|
| 30 | }
|
---|
| 31 | PRPAIN201303UVMFMIMT700701UV01Subject1 subject = subject1s.get(0);
|
---|
| 32 | if (subject.getRegistrationEvent() != null &&
|
---|
| 33 | subject.getRegistrationEvent().getSubject1() != null &&
|
---|
| 34 | subject.getRegistrationEvent().getSubject1().getPatient() != null) {
|
---|
| 35 |
|
---|
| 36 | if (subject.getRegistrationEvent().getSubject1().getPatient().getPatientPerson() != null) {
|
---|
| 37 | patient = subject.getRegistrationEvent().getSubject1().getPatient();
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 | return patient;
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.