Skip to content

Commit

Permalink
MAT-7583 mapping issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecilia Liu committed Aug 9, 2024
1 parent 8fb9498 commit 03b7bef
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>gov.cms.madie</groupId>
<artifactId>madie-java-models</artifactId>
<version>0.6.55-SNAPSHOT</version>
<version>0.6.56-SNAPSHOT</version>
<name>madie-java-models</name>
<description>Java based models for MADiE microservices</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class AssessmentPerformed extends DataElement {
private Code interpretation;
private List<Component> components;
private Object[] relatedTo;
private Entity performer;
private Entity[] performer;
private String qdmTitle = "Assessment, Performed";
private String hqmfOid = "2.16.840.1.113883.10.20.28.4.117";
private String qdmCategory = "assessment";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import gov.cms.madie.models.cqm.datacriteria.basetypes.DataElement;
import gov.cms.madie.models.cqm.datacriteria.attributes.Entity;
import gov.cms.madie.models.cqm.datacriteria.attributes.FacilityLocation;
import gov.cms.madie.models.cqm.datacriteria.basetypes.Code;
import gov.cms.madie.models.cqm.datacriteria.basetypes.Interval;
import gov.cms.madie.models.cqm.datacriteria.basetypes.LocalDateTimeFormatConstant;
Expand Down Expand Up @@ -39,7 +40,7 @@ public class EncounterPerformed extends DataElement {
private Code clazz;
private Interval relevantPeriod;
private Code dischargeDisposition;
private List<Code> facilityLocations;
private List<FacilityLocation> facilityLocations;
private List<DiagnosisComponent> diagnoses;
private Quantity lengthOfStay;
private Code priority;
Expand All @@ -55,5 +56,13 @@ public class EncounterPerformed extends DataElement {
public void shiftDates(int shifted) {
this.authorDatetime = shiftDateByYear(this.authorDatetime, shifted);
this.relevantPeriod = shiftIntervalByYear(this.relevantPeriod, shifted);
if (!org.springframework.util.CollectionUtils.isEmpty(this.facilityLocations)) {
this.facilityLocations.stream()
.forEach(
facilityLocation -> {
facilityLocation.setLocationPeriod(
shiftIntervalByYear(facilityLocation.getLocationPeriod(), shifted));
});
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package gov.cms.madie.models.cqm.datacriteria.attributes;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import gov.cms.madie.models.cqm.datacriteria.basetypes.DataElement;
import lombok.AllArgsConstructor;
import lombok.Data;
Expand All @@ -10,6 +12,7 @@
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class Entity implements Attribute {
private DataElement dataElement;
private String id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import gov.cms.madie.models.cqm.datacriteria.basetypes.Code;
import gov.cms.madie.models.cqm.datacriteria.basetypes.Interval;
Expand All @@ -16,6 +17,7 @@
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class FacilityLocation implements Attribute {

private Code code;
Expand All @@ -27,4 +29,5 @@ public class FacilityLocation implements Attribute {
private Interval locationPeriod;

private String qdmVersion = "5.6";
private String _type = "QDM::FacilityLocation";
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class Identifier implements Attribute {
private String namingSystem;
private String value;
private String qdmVersion = "5.6";
private String _type = "QDM::Identifier";

// CQM validates uniqueness of value with conditions
// where namingSystem is CQM::Provider::NPI_OID
Expand Down

0 comments on commit 03b7bef

Please sign in to comment.