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 |
|
---|
| 6 | package gov.hhs.fha.nhinc.adaptermpimanager.HL7Parsers;
|
---|
| 7 |
|
---|
| 8 | import gov.hhs.fha.nhinc.mpilib.*;
|
---|
| 9 | import org.apache.commons.logging.Log;
|
---|
| 10 | import org.apache.commons.logging.LogFactory;
|
---|
| 11 | import org.hl7.v3.*;
|
---|
| 12 |
|
---|
| 13 | /**
|
---|
| 14 | *
|
---|
| 15 | * @author rayj
|
---|
| 16 | */
|
---|
| 17 | public class HL7Parser {
|
---|
| 18 | private static Log log = LogFactory.getLog(HL7Parser.class);
|
---|
| 19 |
|
---|
| 20 | public static void PrintMessageIdFromMessage(Object message) {
|
---|
| 21 | log.debug("Begin HL7Parser.PrintMessageIdFromMessage(Object)");
|
---|
| 22 | if (message != null) {
|
---|
| 23 | if (message instanceof PRPAIN201301UV) {
|
---|
| 24 | HL7Parser201301.PrintMessageIdFromMessage((PRPAIN201301UV) message);
|
---|
| 25 | }
|
---|
| 26 | if (message instanceof PRPAIN201303UV) {
|
---|
| 27 | HL7Parser201303.PrintMessageIdFromMessage((PRPAIN201303UV) message);
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
| 30 | log.debug("End HL7Parser.PrintMessageIdFromMessage(Object)");
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | public static void PrintId(II id, String idname) {
|
---|
| 34 | if (idname == null) {
|
---|
| 35 | idname = "";
|
---|
| 36 | }
|
---|
| 37 | if (!(id == null)) {
|
---|
| 38 | log.info(idname + ".id.root=" + id.getRoot() + ";");
|
---|
| 39 | log.info(idname + ".id.extension=" + id.getExtension() + ";");
|
---|
| 40 | } else {
|
---|
| 41 | log.info("id for " + idname + " is null");
|
---|
| 42 | }
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | public static void PrintId(java.util.List<II> ids, String idname) {
|
---|
| 46 | for (II id : ids) {
|
---|
| 47 | PrintId(id, idname);
|
---|
| 48 | }
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.