Skip to content

Commit 3a19db3

Browse files
author
Nico Piel
committed
Drop reader tests covered by the serializer fixtures
The HL7 batch and NCPDP request/response fixtures already pin the headers and segment layout these tests asserted. testTransactionGroups stays, since every fixture carries a single transaction. Signed-off-by: Nico Piel <nico.piel@hotmail.de>
1 parent 4e3f7aa commit 3a19db3

2 files changed

Lines changed: 0 additions & 66 deletions

File tree

‎server/src/test/java/com/mirth/connect/plugins/datatypes/hl7v2/ER7ReaderTest.java‎

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,6 @@ private static int count(Document doc, String xpath) throws Exception {
4343
return ((NodeList) XPathFactory.newInstance().newXPath().evaluate(xpath, doc, XPathConstants.NODESET)).getLength();
4444
}
4545

46-
@Test
47-
public void testHeaderAndSegments() throws Exception {
48-
Document doc = parse("MSH|^~\\&|APP|FAC\rPID|1||12345^^^MRN||DOE^JOHN\r");
49-
50-
assertEquals("HL7Message", doc.getDocumentElement().getNodeName());
51-
assertEquals("|", text(doc, "/HL7Message/MSH/MSH.1"));
52-
assertEquals("^~\\&", text(doc, "/HL7Message/MSH/MSH.2"));
53-
assertEquals("APP", text(doc, "/HL7Message/MSH/MSH.3/MSH.3.1"));
54-
assertEquals("FAC", text(doc, "/HL7Message/MSH/MSH.4/MSH.4.1"));
55-
assertEquals("1", text(doc, "/HL7Message/PID/PID.1/PID.1.1"));
56-
assertEquals("12345", text(doc, "/HL7Message/PID/PID.3/PID.3.1"));
57-
assertEquals("MRN", text(doc, "/HL7Message/PID/PID.3/PID.3.4"));
58-
assertEquals("DOE", text(doc, "/HL7Message/PID/PID.5/PID.5.1"));
59-
assertEquals("JOHN", text(doc, "/HL7Message/PID/PID.5/PID.5.2"));
60-
}
61-
6246
@Test
6347
public void testEmptyFields() throws Exception {
6448
Document doc = parse("MSH|^~\\&\rPID|||X|");
@@ -157,18 +141,6 @@ public void testHeaderWithOnlyEncodingCharacters() throws Exception {
157141
assertEquals("^~\\&", text(parse("MSH|^~\\&"), "/HL7Message/MSH/MSH.2"));
158142
}
159143

160-
@Test
161-
public void testBatchHeaders() throws Exception {
162-
Document doc = parse("FHS|^~\\&|F\rBHS|^~\\&|B\rMSH|^~\\&|M\rBTS|1\rFTS|1");
163-
164-
assertEquals("^~\\&", text(doc, "/HL7Message/FHS/FHS.2"));
165-
assertEquals("F", text(doc, "/HL7Message/FHS/FHS.3/FHS.3.1"));
166-
assertEquals("^~\\&", text(doc, "/HL7Message/BHS/BHS.2"));
167-
assertEquals("B", text(doc, "/HL7Message/BHS/BHS.3/BHS.3.1"));
168-
assertEquals("M", text(doc, "/HL7Message/MSH/MSH.3/MSH.3.1"));
169-
assertEquals("1", text(doc, "/HL7Message/FTS/FTS.1/FTS.1.1"));
170-
}
171-
172144
@Test
173145
public void testMessageWithoutHeaderUsesDefaultSeparators() throws Exception {
174146
Document doc = parse("PID|1|A^B~C", true, false);

‎server/src/test/java/com/mirth/connect/plugins/datatypes/ncpdp/NCPDPReaderTest.java‎

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -57,44 +57,6 @@ private static int count(Document doc, String xpath) throws Exception {
5757
return ((NodeList) XPathFactory.newInstance().newXPath().evaluate(xpath, doc, XPathConstants.NODESET)).getLength();
5858
}
5959

60-
@Test
61-
public void testRequestHeader() throws Exception {
62-
Document doc = parse(REQUEST_HEADER_D0 + segment("AM01", "C419800101", "C51"));
63-
64-
assertEquals("NCPDP_D0_Billing_Request", doc.getDocumentElement().getNodeName());
65-
String header = "/NCPDP_D0_Billing_Request/TransactionHeaderRequest/";
66-
assertEquals("610066", text(doc, header + "BinNumber"));
67-
assertEquals("D0", text(doc, header + "VersionReleaseNumber"));
68-
assertEquals("B1", text(doc, header + "TransactionCode"));
69-
assertEquals("PCN1234567", text(doc, header + "ProcessorControlNumber"));
70-
assertEquals("1", text(doc, header + "TransactionCount"));
71-
assertEquals("01", text(doc, header + "ServiceProviderIdQualifier"));
72-
assertEquals("123456789012345", text(doc, header + "ServiceProviderId"));
73-
assertEquals("20261031", text(doc, header + "DateOfService"));
74-
assertEquals("VENDOR1234", text(doc, header + "SoftwareVendorCertificationId"));
75-
76-
assertEquals("19800101", text(doc, "/NCPDP_D0_Billing_Request/Patient/DateOfBirth"));
77-
assertEquals("1", text(doc, "/NCPDP_D0_Billing_Request/Patient/PatientGenderCode"));
78-
}
79-
80-
@Test
81-
public void testResponseHeader() throws Exception {
82-
Document doc = parse(RESPONSE_HEADER_D0 + segment("AM21", "ANA", "F3AUTH1"));
83-
84-
assertEquals("NCPDP_D0_Billing_Response", doc.getDocumentElement().getNodeName());
85-
String header = "/NCPDP_D0_Billing_Response/TransactionHeaderResponse/";
86-
assertEquals("D0", text(doc, header + "VersionReleaseNumber"));
87-
assertEquals("B1", text(doc, header + "TransactionCode"));
88-
assertEquals("1", text(doc, header + "TransactionCount"));
89-
assertEquals("A", text(doc, header + "HeaderResponseStatus"));
90-
assertEquals("01", text(doc, header + "ServiceProviderIdQualifier"));
91-
assertEquals("123456789012345", text(doc, header + "ServiceProviderId"));
92-
assertEquals("20261031", text(doc, header + "DateOfService"));
93-
94-
assertEquals("A", text(doc, "/NCPDP_D0_Billing_Response/ResponseStatus/TransactionResponseStatus"));
95-
assertEquals("AUTH1", text(doc, "/NCPDP_D0_Billing_Response/ResponseStatus/AuthorizationNumber"));
96-
}
97-
9860
@Test
9961
public void testUnknownTransactionCodeAndField() throws Exception {
10062
String header = REQUEST_HEADER_D0.substring(0, 8) + "ZZ" + REQUEST_HEADER_D0.substring(10);

0 commit comments

Comments
 (0)