I wrote a program that writes Z-Segment code for HAPI from a tab separated text table format like this. I say like, since it also wants the data type of each field, and doesn’t cope so well with fields that are not specified at all.
I have attached my interpretation of the table below as java code for HAPI. Note that there are a couple of things that I would suggest you address. Specifically those fields which you have specified as having components. You want to try to find a suitable HL7 datatype to use if you are going to do this. I interpreted them as CE datatypes, since that has sufficient components to cover 6 values, but it is a workaround, not a solution. Also the Allergy Information field has been changed to repeating, since you can’t really specify an indeterminate number of components. As a result text lines would be separated by tilde (~). Code and text file I used to generate it are attached. Hope this helps. Ian From: john strecker [mailto:john.strec...@anshealth.com] Sent: Friday, 13 March 2015 6:35 AM To: hl7api-devel@lists.sourceforge.net Subject: [HAPI-devel] Custom Z segment creation Can someone point me in the right direction on some examples to create a custom Z segment for the below req.. Thanks >> ZAP – Additional Information Field Number Name Required Description 01 DEA Schedule R DEA Classification 06 Date Written O CCYYMMDDhhmmss for label 07 Safety Cap Preference O EasyOpen or SafetyCap 09 Script Image Filename O [<path>]<filename>.<extension> 10 Refill Contact Phone Number O 11 Drug Brand Name O Brand Name for Label^Manufacturer 12 Drug Generic Equivalent O Generic Name for Label^Manufacturer 13 Refill Information O <Refill Message>^<Refill Date>^ <Refill Phone Number> 14 Substance Expiration Date O CCYYMMDD 15 Rx Pricing Information O <Rx Price>^<Rx CoPay>^<3rd Party amt>^<Store Cost>^<3rd Party Name> 16 Allergy Information O <Text1>^<Text2>^…^<TextN> 17 Dispensed Drug Name O <Drug Name>^<Drug Manufacturer> 18 Substitution Message O For label 21 Patient Notes O Free form, 255 character limit 22 Payment/Balance Information O <Charge>^<Previous Balance>^ <Amount Paid>^<New Balance>^ <Payment Method>^<Account Number> -- John S. Strecker Owner/President AdvanceNet Health Solutions, Inc. www.anshealth.com<http://www.anshealth.com> phone:(800) 919-3744 fax:(267)-387-6889 ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. **********************************************************************************
1 ST R DEA Schedule 2 ST O Unknown Field 2 3 ST O Unknown Field 3 4 ST O Unknown Field 4 5 ST O Unknown Field 5 6 TS O Date Written 7 ST O Safety Cap Preference 8 ST O Unknown Field 8 9 ST O Script Image Filename 10 ST O Refill Contact Phone Number 11 ST O Drug Brand Name 12 ST O Drug Generic Equivalent 13 CE O Refill Information 14 TS O Substance Expiration Date 15 CE O Rx Pricing Information 16 ST O Y Allergy Information 17 CE O Dispensed Drug Name 18 ST O Substitution Message 19 ST O Unknown Field 19 20 ST O Unknown Field 20 21 255 ST O Patient Notes 22 CE O Payment/Balance Information
ZAP.java
Description: ZAP.java
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel