use of gov.cms.bfd.server.war.commons.Diagnosis in project beneficiary-fhir-data by CMSgov.
the class DiagnosisUtilV2 method translateLabels.
/**
* Translates a list of {@link DiagnosisLabel} to an EOB type specific Coding based on the (@link
* ClaimTypeV2}.
*
* <p>In practice, the list will only ever be one {@link DiagnosisLabel}. The {@link Diagnosis}
* class allows multiple labels to be present, so we cover that case here. In V2, only a single
* label will ever be assigned.
*/
static CodeableConcept translateLabels(Set<DiagnosisLabel> labels, ClaimTypeV2 claimType) {
CodeableConcept diagType = new CodeableConcept();
List<Coding> codings = labels.stream().map(l -> translateLabelCode(l, claimType)).collect(Collectors.toList());
return diagType.setCoding(codings);
}
Aggregations