I am building an application which of course has a model. I want to construct as HL7 message from this model. I have a mapping table in my database, used to identify each field I am interested in using from my model, which maps to a HL7 entity. I am generating requests for tests to several (hundreds of) labs and each lab is going to be different. So I will go to my mapping table and load the mappings from my model into the unique HL7 layout for that lab.
I will create a HL7 MSH segment and then from that use the addNonstandardSegment
method. Can this method also add standard normal segments and such. Am I thinking correctly, is there a better way..
Reading an HL7 message and mapping into my model is fairly easy, use Terser and one of the segment iterators and .. not too bad.. are there any tricks in HAPI that I should know about to Generate an HL7 message given what I have described..
ORM_O01 orm =
new ORM_O01();MSH mshSegment = orm.getMSH();
mshSegment.getFieldSeparator().setValue(
"|");mshSegment.getEncodingCharacters().setValue(
"^~\\&");mshSegment.getVersionID().setValue(
"2.3");mshSegment.getDateTimeOfMessage().getTimeOfAnEvent().setValue(
"200701011539");mshSegment.getSendingApplication().getNamespaceID().setValue(
"TestSendingSystem");mshSegment.getSequenceNumber().setValue(
"123");mshSegment.getMessageType().getMessageType().setValue(
"ORM");mshSegment.getMessageType().getTriggerEvent().setValue(
"O01");// Populate the PID SegmentDate now =
new Date();ORM_O01_PATIENT patient = orm.getPATIENT();
patient.getPID().getPatientIDInternalID(0).getCx1_ID().setValue(
"PatId123");------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel