This project serves as a repository for Java POJOs that represent the Redox API Data Model.
DISCLAIMER: This is an open source project providing additional development capabilities on the existing Redox API. It is not an affiliate of Redox and does not represent the company in any way.
Install the dependency using Maven
<dependency>
<groupId>com.jtravan3</groupId>
<artifactId>redox-java-data-model</artifactId>
<version>1.0.5</version>
</dependency>
Using Jackson or other JSON parsing libraries you can map your raw JSON payload received by Redox to a strongly typed Java POJO.
ObjectMapper mapper = new ObjectMapper();
PatientPush patientPush = mapper.readValue(stringJsonContent, PatientPush.class);
patientPush.getAllergies().stream().forEach(allergy -> {
Criticality criticality = allergy.getCriticality();
System.out.println(criticality.getName());
});
or use the provided RedoxDataModelFactory
to create the data models for you by providing the class types
import redox.services.RedoxDataModelFactory;
@Component
public class RedoxDataParser {
public PatientPush getPatientPush() throws IOException {
Path filePath = Path.of("clinicalsummary-patientpush.json");
PatientPush patientPush = RedoxDataModelFactory.parseRedoxJson(filePath, PatientPush.class);
patientPush.getFamilyHistory().forEach(familyHistory -> {
familyHistory.getProblems().forEach(problem -> {
System.out.println(problem);
});
});
return patientPush;
}
}
Our project vision is to make available a Java data model representing the Redox API data model. This data model can be used by those desiring to integrate into EHR's via Redox and Java-based applications.
Please see CONTRIBUTING.md for more details regarding contributing issues or code.
If you are experiencing a bug, please feel free to file an issue. For general questions, please post them to StackOverflow with the tag redox-java-data-model
.
The content of this project itself is licensed under the Creative Commons Attribution 3.0 Unported license, and the underlying source code used to format and display that content is licensed under the MIT license.
For further references regarding Redox:
For further references with Spring Boot:
For further references with Maven's dependency management framework: