Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored methods in FHIR converter #5674

Merged
merged 2 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package gov.cdc.usds.simplereport.api.converter;

import gov.cdc.usds.simplereport.db.model.auxiliary.TestCorrectionStatus;
import lombok.Builder;
import lombok.Getter;

@Builder
@Getter
public class ConvertToObservationProps {
private String diseaseCode;
private String diseaseName;
private String resultCode;
private TestCorrectionStatus correctionStatus;
private String correctionReason;
private String id;
private String resultDescription;
private String testkitNameId;
private String equipmentUid;
private String deviceModel;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package gov.cdc.usds.simplereport.api.converter;

import gov.cdc.usds.simplereport.db.model.PhoneNumber;
import gov.cdc.usds.simplereport.db.model.auxiliary.PersonName;
import gov.cdc.usds.simplereport.db.model.auxiliary.StreetAddress;
import java.time.LocalDate;
import java.util.List;
import lombok.Builder;
import lombok.Getter;

@Builder
@Getter
public class ConvertToPatientProps {
private String id;
private PersonName name;
private List<PhoneNumber> phoneNumbers;
private List<String> emails;
private String gender;
private LocalDate dob;
private StreetAddress address;
private String country;
private String race;
private String ethnicity;
private List<String> tribalAffiliations;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package gov.cdc.usds.simplereport.api.converter;

import java.util.Date;
import java.util.List;
import java.util.Set;
import lombok.Builder;
import lombok.Getter;
import org.hl7.fhir.r4.model.Device;
import org.hl7.fhir.r4.model.DiagnosticReport;
import org.hl7.fhir.r4.model.Observation;
import org.hl7.fhir.r4.model.Organization;
import org.hl7.fhir.r4.model.Patient;
import org.hl7.fhir.r4.model.Practitioner;
import org.hl7.fhir.r4.model.ServiceRequest;
import org.hl7.fhir.r4.model.Specimen;
import org.springframework.boot.info.GitProperties;

@Builder
@Getter
public class CreateFhirBundleProps {
private Patient patient;
private Organization testingLab;
private Organization orderingFacility;
private Practitioner practitioner;
private Device device;
private Specimen specimen;
private List<Observation> resultObservations;
private Set<Observation> aoeObservations;
private ServiceRequest serviceRequest;
private DiagnosticReport diagnosticReport;
private Date currentDate;
private GitProperties gitProperties;
private String processingId;
}
Loading