From: Tripp, B. <Bry...@uh...> - 2003-06-17 17:04:25
|
Hi Didier,=20 The message object will create the segment itself the first time you = request it, so you would normally just do this:=20 MSH msh =3D msg.getMSH();=20 In HAPI 0.4 you will be able to add non-standard segments to a message structure using Group.addNonstandardSegment(), but this is a rarely = used technique -- the above is still preferred. =20 Regards,=20 Bryan=20 > -----Original Message----- > From: did...@ch... = [mailto:did...@ch...] > Sent: June 17, 2003 12:34 PM > To: hl7...@li... > Subject: [HAPI-devel] Adding segment to message >=20 >=20 >=20 > Hi >=20 > I've tried to create some segments. For example : > MSH msh =3D null; >=20 > msh =3D new MSH(msg); > msh.getFieldSeparator().setValue("|"); > msh.getEncodingCharacters().setValue("^~\\&"); > msh.getSendingApplication().getNamespaceID().setValue("ORMED"); > msh.getReceivingApplication().getNamespaceID().setValue("PYXISRX"); >=20 >=20 > How must i declare the variable msg and how i can add this=20 > segment to a > message? >=20 > Thanks in advance. >=20 > Regards >=20 > Didier >=20 > Didier Bosson >=20 > Unilog USR S.A. > Chemin des coquelicots 16 > CH - 1214 Vernier >=20 > t=E9l. : +41 (0) 22 706 29 00 > fax : +41 (0) 22 706 29 01 > e-mail : did...@ch... >=20 > http://www.unilog-usr.ch >=20 >=20 >=20 >=20 > ************************************************************** > ********* >=20 > This message is confidential; its contents do not constitute a > commitment by UNILOG except where provided for in a written agreement > between you and UNILOG . Any unauthorised disclosure, use or > dissemination, either whole or partial, is prohibited. If you are not > the intended recipient of the message, please notify the sender > immediately. >=20 > ************************************************************** > ********* >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU=20 > Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly=20 > Commission! > INetU Dedicated Managed Hosting = http://www.inetu.net/partner/index.php > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel >=20 This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact = the sender and delete all copies. Opinions, conclusions or other information contained = in this e-mail may not be that of the organization. |