Skip to content

This project contains Java POJOs representing the Redox API data model.

License

Notifications You must be signed in to change notification settings

jtravan3/redox-java-data-model

Repository files navigation

Redox Banner

Redox Java Data Model

Maven Central Java CI License: MIT PRs Welcome Gitter codecov

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.

Usage

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;
    }
}

Philosophy

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.

Contributing

Please see CONTRIBUTING.md for more details regarding contributing issues or code.

Questions

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.

License

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.

Resources

Redox

For further references regarding Redox:

Spring Boot

For further references with Spring Boot:

Maven

For further references with Maven's dependency management framework: