use of org.hl7.fhir.dstu3.formats.IParser in project beneficiary-fhir-data by CMSgov.
the class DMEClaimTransformerV2Test method before.
@BeforeEach
public void before() {
claim = generateClaim();
ExplanationOfBenefit genEob = DMEClaimTransformerV2.transform(new MetricRegistry(), claim, Optional.empty());
IParser parser = fhirContext.newJsonParser();
String json = parser.encodeResourceToString(genEob);
eob = parser.parseResource(ExplanationOfBenefit.class, json);
}
use of org.hl7.fhir.dstu3.formats.IParser in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method before.
@BeforeEach
public void before() {
claim = generateClaim();
ExplanationOfBenefit genEob = CarrierClaimTransformerV2.transform(new MetricRegistry(), claim, Optional.empty());
IParser parser = fhirContext.newJsonParser();
String json = parser.encodeResourceToString(genEob);
eob = parser.parseResource(ExplanationOfBenefit.class, json);
}
use of org.hl7.fhir.dstu3.formats.IParser in project beneficiary-fhir-data by CMSgov.
the class HospiceClaimTransformerV2Test method createEOB.
private void createEOB(Optional<Boolean> includeTaxNumber) {
ExplanationOfBenefit genEob = HospiceClaimTransformerV2.transform(new MetricRegistry(), claim, includeTaxNumber);
IParser parser = fhirContext.newJsonParser();
String json = parser.encodeResourceToString(genEob);
eob = parser.parseResource(ExplanationOfBenefit.class, json);
}
use of org.hl7.fhir.dstu3.formats.IParser in project beneficiary-fhir-data by CMSgov.
the class InpatientClaimTransformerV2Test method before.
@BeforeEach
public void before() {
claim = generateClaim();
ExplanationOfBenefit genEob = InpatientClaimTransformerV2.transform(new MetricRegistry(), claim, Optional.empty());
IParser parser = fhirContext.newJsonParser();
String json = parser.encodeResourceToString(genEob);
eob = parser.parseResource(ExplanationOfBenefit.class, json);
}
use of org.hl7.fhir.dstu3.formats.IParser in project kindling by HL7.
the class Publisher method resource2Json.
private String resource2Json(Resource r) throws Exception {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
IParser json = new JsonParser().setOutputStyle(OutputStyle.PRETTY);
json.setSuppressXhtml("Snipped for Brevity");
json.compose(bytes, r);
bytes.close();
return new String(bytes.toByteArray());
}
Aggregations