openesb-components/ojc-core/encodersl/encoder-hl7/test/testcases.txt

133 lines
14 KiB
Plaintext
Executable File

#fields: test case type ("E" for encode or "D" for decode), test case name, expected result ("T" for succeed and "F" for fail), schema file, root element name, input file, output file (optional), expected output file (optional)
######### 2.1 test cases ########
# ADT_A01 (data copied from HL7 OTD library testing data)
D, 2.1 ADT_A01 - decode, T, test/data/hl7_21_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_21_xsd/ADT_A01.dat, test/data/hl7_21_xsd/ADT_A01.dec.xml, test/data/hl7_21_xsd/ADT_A01.xml
E, 2.1 ADT_A01 - encode, T, test/data/hl7_21_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_21_xsd/ADT_A01.dec.xml, test/data/hl7_21_xsd/ADT_A01.enc.out, test/data/hl7_21_xsd/ADT_A01.out
# BAR_P01 (data copied from HL7 OTD library testing data)
D, 2.1 BAR_P01 - decode, T, test/data/hl7_21_xsd/BAR_P01.xsd, {urn:hl7-org:v2xml}BAR_P01, test/data/hl7_21_xsd/BAR_P01.dat, test/data/hl7_21_xsd/BAR_P01.dec.xml, test/data/hl7_21_xsd/BAR_P01.xml
E, 2.1 BAR_P01 - encode, T, test/data/hl7_21_xsd/BAR_P01.xsd, {urn:hl7-org:v2xml}BAR_P01, test/data/hl7_21_xsd/BAR_P01.dec.xml, test/data/hl7_21_xsd/BAR_P01.enc.out, test/data/hl7_21_xsd/BAR_P01.dat
######### 2.2 test cases ########
# ADT_A01 (data copied from HL7 OTD library testing data)
D, 2.2 ADT_A01 - decode, T, test/data/hl7_22_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_22_xsd/ADT_A01.dat, test/data/hl7_22_xsd/ADT_A01.dec.xml, test/data/hl7_22_xsd/ADT_A01.exp.xml
E, 2.2 ADT_A01 - encode, T, test/data/hl7_22_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_22_xsd/ADT_A01.xml, test/data/hl7_22_xsd/ADT_A01.enc.out, test/data/hl7_22_xsd/ADT_A01.out
######### 2.3 test cases ########
# ADT_A01 (data copied from HL7 OTD library testing data)
D, 2.3 ADT_A01 - decode, T, test/data/hl7_23_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_23_xsd/ADT_A01.dat, test/data/hl7_23_xsd/ADT_A01.dec.xml, test/data/hl7_23_xsd/ADT_A01.xml
E, 2.3 ADT_A01 - encode, T, test/data/hl7_23_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_23_xsd/ADT_A01.dec.xml, test/data/hl7_23_xsd/ADT_A01.enc.out, test/data/hl7_23_xsd/ADT_A01.out
# DFT_P03 (data provided by Dairyland Healthcare Solutions)
D, 2.3 DFT_P03 - decode, T, test/data/hl7_23_xsd/DFT_P03.xsd, {urn:hl7-org:v2xml}DFT_P03, test/data/hl7_23_xsd/DFT_P03.dat, test/data/hl7_23_xsd/DFT_P03.dec.xml, test/data/hl7_23_xsd/DFT_P03.exp.xml
E, 2.3 DFT_P03 - encode, T, test/data/hl7_23_xsd/DFT_P03.xsd, {urn:hl7-org:v2xml}DFT_P03, test/data/hl7_23_xsd/DFT_P03.xml, test/data/hl7_23_xsd/DFT_P03.enc.out, test/data/hl7_23_xsd/DFT_P03.out
# ADT_A01.BATCH
D, 2.3 ADT_A01.BATCH - decode, T, test/data/hl7_23_xsd/ADT_A01.BATCH.xsd, {urn:hl7-org:v2xml}ADT_A01.BATCH, test/data/hl7_23_xsd/ADT_A01.BATCH.dat, test/data/hl7_23_xsd/ADT_A01.BATCH.dec.xml, test/data/hl7_23_xsd/ADT_A01.BATCH.xml
E, 2.3 ADT_A01.BATCH - encode, T, test/data/hl7_23_xsd/ADT_A01.BATCH.xsd, {urn:hl7-org:v2xml}ADT_A01.BATCH, test/data/hl7_23_xsd/ADT_A01.BATCH.xml, test/data/hl7_23_xsd/ADT_A01.BATCH.enc.out, test/data/hl7_23_xsd/ADT_A01.BATCH.out
# DFT_P03.BATCH
D, 2.3 DFT_P03.BATCH - decode, T, test/data/hl7_23_xsd/DFT_P03.BATCH.xsd, {urn:hl7-org:v2xml}DFT_P03.BATCH, test/data/hl7_23_xsd/DFT_P03.BATCH.dat, test/data/hl7_23_xsd/DFT_P03.BATCH.dec.xml, test/data/hl7_23_xsd/DFT_P03.BATCH.xml
E, 2.3 DFT_P03.BATCH - encode, T, test/data/hl7_23_xsd/DFT_P03.BATCH.xsd, {urn:hl7-org:v2xml}DFT_P03.BATCH, test/data/hl7_23_xsd/DFT_P03.BATCH.xml, test/data/hl7_23_xsd/DFT_P03.BATCH.enc.out, test/data/hl7_23_xsd/DFT_P03.BATCH.out
# ORU_R01.BATCH (from Fred )
D, 2.3 ORU_R01.BATCH - decode, T, test/data/hl7_23_xsd/ORU_R01.BATCH.xsd, {urn:hl7-org:v2xml}ORU_R01.BATCH, test/data/hl7_23_xsd/ORU_R01.BATCH.dat, test/data/hl7_23_xsd/ORU_R01.BATCH.dec.xml, test/data/hl7_23_xsd/ORU_R01.BATCH.xml
E, 2.3 ORU_R01.BATCH - encode, T, test/data/hl7_23_xsd/ORU_R01.BATCH.xsd, {urn:hl7-org:v2xml}ORU_R01.BATCH, test/data/hl7_23_xsd/ORU_R01.BATCH.xml, test/data/hl7_23_xsd/ORU_R01.BATCH.enc.out, test/data/hl7_23_xsd/ORU_R01.BATCH.dat
# ORU_R01 (from fredaabedi@yahoo.com, original data from JTest_lab.txt which fails decoding due to requirement elements missing,
# modified1 to add OCR.7 and OBR.27, modified2 to escape delimiters in simple content field.
# see http://www.nabble.com/problem-with-the-HL7-encoder-td24314495.html)
D, 2.3 ORU_R01 - decode original, F, test/data/hl7_23_xsd/ORU_R01.xsd, {urn:hl7-org:v2xml}ORU_R01, test/data/hl7_23_xsd/ORU_R01_original.dat, test/data/hl7_23_xsd/ORU_R01_original.dec.xml, test/data/hl7_23_xsd/ORU_R01_original.err
D, 2.3 ORU_R01 - decode modified1, T, test/data/hl7_23_xsd/ORU_R01.xsd, {urn:hl7-org:v2xml}ORU_R01, test/data/hl7_23_xsd/ORU_R01_modified1.dat, test/data/hl7_23_xsd/ORU_R01_modified1.dec.xml, test/data/hl7_23_xsd/ORU_R01_modified1.xml
E, 2.3 ORU_R01 - encode modified1, T, test/data/hl7_23_xsd/ORU_R01.xsd, {urn:hl7-org:v2xml}ORU_R01, test/data/hl7_23_xsd/ORU_R01_modified1.xml, test/data/hl7_23_xsd/ORU_R01_modified1.enc.out, test/data/hl7_23_xsd/ORU_R01_modified1.out
D, 2.3 ORU_R01 - decode modified2, T, test/data/hl7_23_xsd/ORU_R01.xsd, {urn:hl7-org:v2xml}ORU_R01, test/data/hl7_23_xsd/ORU_R01_modified2.dat, test/data/hl7_23_xsd/ORU_R01_modified2.dec.xml, test/data/hl7_23_xsd/ORU_R01_modified2.xml
E, 2.3 ORU_R01 - encode modified2, T, test/data/hl7_23_xsd/ORU_R01.xsd, {urn:hl7-org:v2xml}ORU_R01, test/data/hl7_23_xsd/ORU_R01_modified2.xml, test/data/hl7_23_xsd/ORU_R01_modified2.enc.out, test/data/hl7_23_xsd/ORU_R01_modified2.out
# ORU_R01.BATCH_1 (from fredaabedi@yahoo.com, Open-ESB issue 2218 - this smaller test data version handles the situation
# where MSH or other header segments got split by buffer read so that an immediate
# buffer read is also needed to ensure the segment ID is in the same buffer - other situations where
# segment ID other than header segment got split by a pervious buffer read have been handled by parser.)
D, 2.3 ORU_R01.BATCH_1 - decode, T, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH.xsd, {urn:hl7-org:v2xml}ORU_R01.BATCH, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_1.dat, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_1.dec.xml, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_1.xml
E, 2.3 ORU_R01.BATCH_1 - encode, T, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH.xsd, {urn:hl7-org:v2xml}ORU_R01.BATCH, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_1.xml, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_1.enc.out, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_1.out
# ORU_R01.BATCH_2 (from fredaabedi@yahoo.com, Open-ESB issue 2218 - this smaller test data version handles the situation
# where MSH or other header segments got split by a previous buffer read and later the segment ID got correctly assembled
# but need to adjust the rawPos and col correctly to the right value in order for the parser to parse correctly.)
D, 2.3 ORU_R01.BATCH_2 - decode, T, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH.xsd, {urn:hl7-org:v2xml}ORU_R01.BATCH, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_2.dat, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_2.dec.xml, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_2.xml
E, 2.3 ORU_R01.BATCH_2 - encode, T, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH.xsd, {urn:hl7-org:v2xml}ORU_R01.BATCH, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_2.xml, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_2.enc.out, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_2.out
# ORU_R01.BATCH_0 (from fredaabedi@yahoo.com, Open-ESB issue 2218 - this is the original large message data that failed parsing
# due to 2 problems as tested in above ORU_R01.BATCH_1, and ORU_R01.BATCH_2.
#NEED "junit.maxmemory" to be "1024m" in m2.ant in order to run this --- D, 2.3 ORU_R01.BATCH_0 - decode, T, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH.xsd, {urn:hl7-org:v2xml}ORU_R01.BATCH, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_0.dat, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_0.dec.xml, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_0.xml
E, 2.3 ORU_R01.BATCH_0 - encode, T, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH.xsd, {urn:hl7-org:v2xml}ORU_R01.BATCH, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_0.xml, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_0.enc.out, test/data/hl7_23_xsd/Fred/ORU_R01.BATCH_0.out
######### 2.3.1 test cases ########
# ACK
D, 2.3.1 ACK - decode, T, test/data/hl7_231_xsd/ACK.xsd, {urn:hl7-org:v2xml}ACK, test/data/hl7_231_xsd/ACK.dat, test/data/hl7_231_xsd/ACK.dec.xml, test/data/hl7_231_xsd/ACK.xml
E, 2.3.1 ACK - encode, T, test/data/hl7_231_xsd/ACK.xsd, {urn:hl7-org:v2xml}ACK, test/data/hl7_231_xsd/ACK.dec.xml, test/data/hl7_231_xsd/ACK.enc.out, test/data/hl7_231_xsd/ACK.out
# ACK - negative test cases with required element MSA.2 missing. each test case has delimiter(s) present or absent
# See: https://open-esb.dev.java.net/issues/show_bug.cgi?id=2119
D, 2.3.1 ACK - decode 1, F, test/data/hl7_231_xsd/ACK.xsd, {urn:hl7-org:v2xml}ACK, test/data/hl7_231_xsd/ACK1.dat, test/data/hl7_231_xsd/ACK1.dec.xml, test/data/hl7_231_xsd/ACK1.err
D, 2.3.1 ACK - decode 2, F, test/data/hl7_231_xsd/ACK.xsd, {urn:hl7-org:v2xml}ACK, test/data/hl7_231_xsd/ACK2.dat, test/data/hl7_231_xsd/ACK2.dec.xml, test/data/hl7_231_xsd/ACK2.err
D, 2.3.1 ACK - decode 3, F, test/data/hl7_231_xsd/ACK.xsd, {urn:hl7-org:v2xml}ACK, test/data/hl7_231_xsd/ACK3.dat, test/data/hl7_231_xsd/ACK3.dec.xml, test/data/hl7_231_xsd/ACK3.err
# ADT_A43
D, 2.3.1 ADT_A43 - decode, T, test/data/hl7_231_xsd/ADT_A43.xsd, {urn:hl7-org:v2xml}ADT_A43, test/data/hl7_231_xsd/ADT_A43.dat, test/data/hl7_231_xsd/ADT_A43.dec.xml, test/data/hl7_231_xsd/ADT_A43.exp.xml
E, 2.3.1 ADT_A43 - encode, T, test/data/hl7_231_xsd/ADT_A43.xsd, {urn:hl7-org:v2xml}ADT_A43, test/data/hl7_231_xsd/ADT_A43.xml, test/data/hl7_231_xsd/ADT_A43.enc.out, test/data/hl7_231_xsd/ADT_A43.out
######### 2.4 test cases ########
# ADT_A01 (data copied from HL7 OTD library testing data)
D, 2.4 ADT_A01 - decode, T, test/data/hl7_24_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_24_xsd/ADT_A01.dat, test/data/hl7_24_xsd/ADT_A01.dec.xml, test/data/hl7_24_xsd/ADT_A01.xml
E, 2.4 ADT_A01 - encode, T, test/data/hl7_24_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_24_xsd/ADT_A01.dec.xml, test/data/hl7_24_xsd/ADT_A01.enc.out, test/data/hl7_24_xsd/ADT_A01.out
# ADT_A08 (test on preDecodeCharCoding and postEncodeCharCoding; see https://open-esb.dev.java.net/issues/show_bug.cgi?id=2280)
D, 2.4 ADT_A08 - decode, T, test/data/hl7_24_xsd/ADT_A08.xsd, {urn:hl7-org:v2xml}ADT_A08, test/data/hl7_24_xsd/ADT_A08.dat, test/data/hl7_24_xsd/ADT_A08.dec.xml, test/data/hl7_24_xsd/ADT_A08.xml
E, 2.4 ADT_A08 - encode, T, test/data/hl7_24_xsd/ADT_A08.xsd, {urn:hl7-org:v2xml}ADT_A08, test/data/hl7_24_xsd/ADT_A08.dec.xml, test/data/hl7_24_xsd/ADT_A08.enc.out, test/data/hl7_24_xsd/ADT_A08.out
######### 2.5 test cases (ADT_A01) ########
# ADT_A01 (copied from XML_Encoding_Rules_for_HL7_v2_Messages.pdf and corrected a few errors)
D, 2.5 ADT_A01 - decode, T, test/data/hl7_25_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_25_xsd/ADT_A01.dat, test/data/hl7_25_xsd/ADT_A01.dec.xml, test/data/hl7_25_xsd/ADT_A01.exp.xml
E, 2.5 ADT_A01 - encode, T, test/data/hl7_25_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_25_xsd/ADT_A01.xml, test/data/hl7_25_xsd/ADT_A01.enc.out, test/data/hl7_25_xsd/ADT_A01.out
# ADR_A19 - escapes test
D, 2.5 ADR_A19 - decode, T, test/data/hl7_25_xsd/ADR_A19.xsd, {urn:hl7-org:v2xml}ADR_A19, test/data/hl7_25_xsd/ADR_A19.dat, test/data/hl7_25_xsd/ADR_A19.dec.xml, test/data/hl7_25_xsd/ADR_A19.exp.xml
E, 2.5 ADR_A19 - encode, T, test/data/hl7_25_xsd/ADR_A19.xsd, {urn:hl7-org:v2xml}ADR_A19, test/data/hl7_25_xsd/ADR_A19.xml, test/data/hl7_25_xsd/ADR_A19.enc.out, test/data/hl7_25_xsd/ADR_A19.out
######### 2.5.1 test cases ########
# ADT_A01
D, 2.5.1 ADT_A01 - decode, T, test/data/hl7_251_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_251_xsd/ADT_A01.dat, test/data/hl7_251_xsd/ADT_A01.dec.xml, test/data/hl7_251_xsd/ADT_A01.xml
E, 2.5.1 ADT_A01 - encode, T, test/data/hl7_251_xsd/ADT_A01.xsd, {urn:hl7-org:v2xml}ADT_A01, test/data/hl7_251_xsd/ADT_A01.dec.xml, test/data/hl7_251_xsd/ADT_A01.enc.out, test/data/hl7_251_xsd/ADT_A01.out
# ADR_A19 - escapes test
D, 2.5.1 ADR_A19 - decode, T, test/data/hl7_251_xsd/ADR_A19.xsd, {urn:hl7-org:v2xml}ADR_A19, test/data/hl7_251_xsd/ADR_A19.dat, test/data/hl7_251_xsd/ADR_A19.dec.xml, test/data/hl7_251_xsd/ADR_A19.xml
E, 2.5.1 ADR_A19 - encode, T, test/data/hl7_251_xsd/ADR_A19.xsd, {urn:hl7-org:v2xml}ADR_A19, test/data/hl7_251_xsd/ADR_A19.dec.xml, test/data/hl7_251_xsd/ADR_A19.enc.out, test/data/hl7_251_xsd/ADR_A19.out
# ADR_A19 - negative encode test with wrong root node
E, 2.5.1 ADR_A19 - encode negative, F, test/data/hl7_251_xsd/ADR_A19.xsd, {urn:hl7-org:v2xml}ADR_A19, test/data/hl7_251_xsd/ADT_A01.xml, test/data/hl7_251_xsd/ADR_A19.enc1.out, test/data/hl7_251_xsd/ADR_A19.err
######### 2.6 test cases ########
# ADT_A06
D, 2.6 ADT_A06 - decode, T, test/data/hl7_26_xsd/ADT_A06.xsd, {urn:hl7-org:v2xml}ADT_A06, test/data/hl7_26_xsd/ADT_A06.dat, test/data/hl7_26_xsd/ADT_A06.dec.xml, test/data/hl7_26_xsd/ADT_A06.exp.xml
E, 2.6 ADT_A06 - encode, T, test/data/hl7_26_xsd/ADT_A06.xsd, {urn:hl7-org:v2xml}ADT_A06, test/data/hl7_26_xsd/ADT_A06.xml, test/data/hl7_26_xsd/ADT_A06.enc.out, test/data/hl7_26_xsd/ADT_A06.out
# RQA_I08
# D, 2.6 RQA_I08 - decode, T, test/data/hl7_26_xsd/RQA_I08.xsd, {urn:hl7-org:v2xml}RQA_I08, test/data/hl7_26_xsd/RQA_I08.dat, test/data/hl7_26_xsd/RQA_I08.dec.xml, test/data/hl7_26_xsd/RQA_I08.exp.xml
# E, 2.6 RQA_I08 - encode, T, test/data/hl7_26_xsd/RQA_I08.xsd, {urn:hl7-org:v2xml}RQA_I08, test/data/hl7_26_xsd/RQA_I08.xml, test/data/hl7_26_xsd/RQA_I08.enc.out, test/data/hl7_26_xsd/RQA_I08.out
######### hypothetical test cases (simple case) ########
# simple case
D, hypothetical simple case - decode, T, test/data/hypothetical/simplecase.xsd, {http://xml.netbeans.org/schema/hl7/hypothetical/simplecase}root, test/data/hypothetical/simplecase.dat, test/data/hypothetical/simplecase.dec.xml, test/data/hypothetical/simplecase.exp.xml
E, hypothetical simple case - encode, T, test/data/hypothetical/simplecase.xsd, {http://xml.netbeans.org/schema/hl7/hypothetical/simplecase}root, test/data/hypothetical/simplecase.xml, test/data/hypothetical/simplecase.enc.out, test/data/hypothetical/simplecase.out