@@ -159,6 +159,28 @@ void decodeClinicalDocumentInternalDecode() {
159
159
.isEqualTo ("123456789" );
160
160
}
161
161
162
+ @ Test
163
+ void decodeAppClinicalDocumentInternalDecode () {
164
+ Element clinicalDocument = makeClinicalDocument ("APP1" );
165
+ Node testParentNode = new Node ();
166
+ ClinicalDocumentDecoder objectUnderTest = new ClinicalDocumentDecoder (new Context ());
167
+ objectUnderTest .setNamespace (clinicalDocument .getNamespace ());
168
+ objectUnderTest .decode (clinicalDocument , testParentNode );
169
+
170
+ assertWithMessage ("Clinical Document doesn't contain program name" )
171
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .PROGRAM_NAME ))
172
+ .isEqualTo (ClinicalDocumentDecoder .APP_PROGRAM_NAME );
173
+ assertWithMessage ("Clinical Document doesn't contain entity type" )
174
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .ENTITY_TYPE ))
175
+ .isEqualTo (ClinicalDocumentDecoder .ENTITY_INDIVIDUAL );
176
+ assertWithMessage ("Clinical Document doesn't contain national provider" )
177
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .NATIONAL_PROVIDER_IDENTIFIER ))
178
+ .isEqualTo ("2567891421" );
179
+ assertWithMessage ("Clinical Document doesn't contain taxpayer id number" )
180
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .TAX_PAYER_IDENTIFICATION_NUMBER ))
181
+ .isEqualTo ("123456789" );
182
+ }
183
+
162
184
@ Test
163
185
void decodeClinicalDocumentInternalDecodeMIPSIndividual () {
164
186
Element clinicalDocument = makeClinicalDocument ("MIPS_INDIV" );
@@ -181,6 +203,28 @@ void decodeClinicalDocumentInternalDecodeMIPSIndividual() {
181
203
.isEqualTo ("123456789" );
182
204
}
183
205
206
+ @ Test
207
+ void decodeClinicalDocumentInternalDecodeMIPSAPPIndividual () {
208
+ Element clinicalDocument = makeClinicalDocument ("MIPS_APP1_INDIV" );
209
+ Node testParentNode = new Node ();
210
+ ClinicalDocumentDecoder objectUnderTest = new ClinicalDocumentDecoder (new Context ());
211
+ objectUnderTest .setNamespace (clinicalDocument .getNamespace ());
212
+ objectUnderTest .decode (clinicalDocument , testParentNode );
213
+
214
+ assertWithMessage ("Clinical Document doesn't contain program name" )
215
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .PROGRAM_NAME ))
216
+ .isEqualTo (ClinicalDocumentDecoder .APP_PROGRAM_NAME );
217
+ assertWithMessage ("Clinical Document doesn't contain entity type" )
218
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .ENTITY_TYPE ))
219
+ .isEqualTo (ClinicalDocumentDecoder .ENTITY_INDIVIDUAL );
220
+ assertWithMessage ("Clinical Document doesn't contain national provider" )
221
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .NATIONAL_PROVIDER_IDENTIFIER ))
222
+ .isEqualTo ("2567891421" );
223
+ assertWithMessage ("Clinical Document doesn't contain taxpayer id number" )
224
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .TAX_PAYER_IDENTIFICATION_NUMBER ))
225
+ .isEqualTo ("123456789" );
226
+ }
227
+
184
228
@ Test
185
229
void decodeClinicalDocumentInternalDecodeMIPSGroup () {
186
230
Element clinicalDocument = makeClinicalDocument ("MIPS_GROUP" );
@@ -203,6 +247,28 @@ void decodeClinicalDocumentInternalDecodeMIPSGroup() {
203
247
.isEqualTo ("123456789" );
204
248
}
205
249
250
+ @ Test
251
+ void decodeClinicalDocumentInternalDecodeMIPSAPPGroup () {
252
+ Element clinicalDocument = makeClinicalDocument ("MIPS_APP1_GROUP" );
253
+ Node testParentNode = new Node ();
254
+ ClinicalDocumentDecoder objectUnderTest = new ClinicalDocumentDecoder (new Context ());
255
+ objectUnderTest .setNamespace (clinicalDocument .getNamespace ());
256
+ objectUnderTest .decode (clinicalDocument , testParentNode );
257
+
258
+ assertWithMessage ("Clinical Document doesn't contain program name" )
259
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .PROGRAM_NAME ))
260
+ .isEqualTo (ClinicalDocumentDecoder .APP_PROGRAM_NAME );
261
+ assertWithMessage ("Clinical Document doesn't contain entity type" )
262
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .ENTITY_TYPE ))
263
+ .isEqualTo (ClinicalDocumentDecoder .ENTITY_GROUP );
264
+ assertWithMessage ("Clinical Document doesn't contain national provider" )
265
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .NATIONAL_PROVIDER_IDENTIFIER ))
266
+ .isNull ();
267
+ assertWithMessage ("Clinical Document doesn't contain taxpayer id number" )
268
+ .that (testParentNode .getValue (ClinicalDocumentDecoder .TAX_PAYER_IDENTIFICATION_NUMBER ))
269
+ .isEqualTo ("123456789" );
270
+ }
271
+
206
272
@ Test
207
273
void decodeClinicalDocumentInternalDecodeUnknown () {
208
274
Element clinicalDocument = makeClinicalDocument ("Unknown" );
@@ -376,6 +442,22 @@ void decodeMipsApmTest() {
376
442
.isEqualTo ("AR000000" );
377
443
}
378
444
445
+ @ Test
446
+ void decodeMipsAppApmTest () {
447
+ Element clinicalDocument = makeClinicalDocument (ClinicalDocumentDecoder .APP_APM );
448
+ clinicalDocument .addContent (prepareParticipant (clinicalDocument .getNamespace ()));
449
+ Node testParentNode = new Node ();
450
+
451
+ ClinicalDocumentDecoder objectUnderTest = new ClinicalDocumentDecoder (new Context ());
452
+ objectUnderTest .setNamespace (clinicalDocument .getNamespace ());
453
+ objectUnderTest .decode (clinicalDocument , testParentNode );
454
+
455
+ assertThat (testParentNode .getValue (ClinicalDocumentDecoder .ENTITY_TYPE ))
456
+ .isEqualTo (ClinicalDocumentDecoder .ENTITY_APM );
457
+ assertThat (testParentNode .getValue (ClinicalDocumentDecoder .ENTITY_ID ))
458
+ .isEqualTo ("AR000000" );
459
+ }
460
+
379
461
@ Test
380
462
void decodeClinicalDocumentInternalDecodeCPCPlus () {
381
463
Element clinicalDocument = makeClinicalDocument (ClinicalDocumentDecoder .CPCPLUS );
0 commit comments