use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class CpcFileControllerV1Test method createMockedUnprocessedDataList.
List<UnprocessedCpcFileData> createMockedUnprocessedDataList() {
Metadata metadata = new Metadata();
metadata.setSubmissionLocator("Test");
metadata.setFileName("TestFile.xml");
metadata.setApm("TestApmEntity");
metadata.setCreatedDate(Instant.now());
metadata.setOverallStatus(true);
UnprocessedCpcFileData unprocessedCpcFileData = new UnprocessedCpcFileData(metadata);
List<UnprocessedCpcFileData> unprocessedCpcFileDataList = new ArrayList<>();
unprocessedCpcFileDataList.add(unprocessedCpcFileData);
return unprocessedCpcFileDataList;
}
use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class QrdaControllerV1Test method testHeadersContainsLocation.
@Test
void testHeadersContainsLocation() {
Metadata metadata = new Metadata();
metadata.setUuid(UUID.randomUUID().toString());
when(qrdaService.convertQrda3ToQpp(any(Source.class))).thenReturn(report);
when(auditService.success(any(ConversionReport.class))).then(invocation -> CompletableFuture.completedFuture(metadata));
ResponseEntity qppResponse = objectUnderTest.uploadQrdaFile(multipartFile, null);
assertThat(qppResponse.getHeaders().get("Location")).containsExactly(metadata.getUuid());
}
use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class MetadataHelperTest method testSuccessOutcome.
@Test
void testSuccessOutcome() {
Metadata metadata = MetadataHelper.generateMetadata(new Node(), MetadataHelper.Outcome.SUCCESS);
assertThat(metadata.getOverallStatus()).isTrue();
assertThat(metadata.getConversionStatus()).isTrue();
assertThat(metadata.getValidationStatus()).isTrue();
}
use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class MetadataHelperTest method testExtractsNpi.
@Test
void testExtractsNpi() {
Node node = new Node();
node.putValue(ClinicalDocumentDecoder.NATIONAL_PROVIDER_IDENTIFIER, MOCK_STRING);
Metadata metadata = MetadataHelper.generateMetadata(node, MetadataHelper.Outcome.SUCCESS);
assertThat(metadata.getNpi()).isEqualTo(MOCK_STRING);
}
use of gov.cms.qpp.conversion.api.model.Metadata in project qpp-conversion-tool by CMSgov.
the class MetadataHelperTest method testExtractsTinFromChild.
@Test
void testExtractsTinFromChild() {
Node node = new Node();
Node child = new Node();
child.setType(TemplateId.CLINICAL_DOCUMENT);
child.putValue(ClinicalDocumentDecoder.TAX_PAYER_IDENTIFICATION_NUMBER, MOCK_STRING);
node.addChildNode(child);
Metadata metadata = MetadataHelper.generateMetadata(node, MetadataHelper.Outcome.SUCCESS);
assertThat(metadata.getTin()).isEqualTo(MOCK_STRING);
}
Aggregations