Skip to content

Commit

Permalink
Merge pull request #72 from mcode/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
smalho01 authored Apr 8, 2024
2 parents 0d2b0a0 + 4f92fd9 commit 72560f9
Show file tree
Hide file tree
Showing 19 changed files with 227 additions and 128 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EHR FHIR Server

This subproject hosts a HAPI FHIR server that is based on the now-deprecated [hapi-fhir-jpaserver-example](https://github.com/jamesagnew/hapi-fhir/tree/master/hapi-fhir-jpaserver-example). The new repo is found [here](https://github.com/hapifhir/hapi-fhir-jpaserver-starter).
This sub-project hosts a HAPI FHIR server that is based on the now-deprecated [hapi-fhir-jpaserver-example](https://github.com/jamesagnew/hapi-fhir/tree/master/hapi-fhir-jpaserver-example). The new repo is found [here](https://github.com/hapifhir/hapi-fhir-jpaserver-starter).

## Running the server

Expand Down
2 changes: 1 addition & 1 deletion bundlefile/HypoxemiaPatientBundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
],
"address": {
"line": [
"773 Wiseman Street"
"773 Wiseman Street"
],
"city": "Knoxville",
"state": "Tennessee",
Expand Down
8 changes: 4 additions & 4 deletions dockerRunnerDev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ echo "loading data into test-ehr..."
gradle loadData

# Continuous Load Data command whenever fhirResourcesToLoad directory changes
reources_modify_time=$(stat -c %Y fhirResourcesToLoad)
resources_modify_time=$(stat -c %Y fhirResourcesToLoad)
while sleep 1
do
new_reources_modify_time=$(stat -c %Y fhirResourcesToLoad)
new_resources_modify_time=$(stat -c %Y fhirResourcesToLoad)

if [[ "$reources_modify_time" != "$new_reources_modify_time" ]]
if [[ "$resources_modify_time" != "$new_resources_modify_time" ]]
then
echo "loading data into test-ehr..."
gradle loadData
fi

reources_modify_time=$new_reources_modify_time
resources_modify_time=$new_resources_modify_time

done ) & LOAD_DATA_PID=$!

Expand Down
2 changes: 1 addition & 1 deletion fhirResourcesToLoad/medication_turalio.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{
"system": "http://snomed.info/sct",
"code": "2183126",
"display": "Product containing only turaliio"
"display": "Product containing only turalio"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"system": "http://snomed.info/sct",
"code": "2183126",
"display": "Product containing only turaliio"
"display": "Product containing only turalio"
}
]
},
Expand Down
78 changes: 78 additions & 0 deletions fhirResourcesToLoad/rems_snow_medicationrequest_acetaminophen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"resourceType": "MedicationRequest",
"id": "pat017-mr-acetaminophen",
"meta": {
"versionId": "1",
"lastUpdated": "2023-12-18T21:12:33.000+00:00",
"source": "#aquj6ECLPVYNYbuX",
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"
]
},
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "PLAC",
"display": "Placer Identifier"
}
]
},
"system": "http://myprescribingsystem.com/ordernumber",
"value": "605153"
}
],
"status": "draft",
"intent": "order",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "993781",
"display": "Acetaminophen 300 MG / Codeine Phosphate 30 MG Oral Tablet"
},
{
"system": "http://hl7.org/fhir/sid/ndc",
"code": "00093015001"
}
],
"text": "Acetaminophen 300 mg / Codeine 30 mg oral tablet"
},
"subject": {
"reference": "Patient/pat017",
"display": "Jon Snow"
},
"authoredOn": "2023-06-05",
"requester": {
"reference": "Practitioner/pra1234",
"display": "Jane Doe"
},
"reasonCode": [
{
"text": "Post dental surgery"
}
],
"dosageInstruction": [
{
"text": "1 tab tid prn pain"
}
],
"dispenseRequest": {
"numberOfRepeatsAllowed": 1,
"quantity": {
"value": 10,
"unit": "each",
"system": "http://unitsofmeasure.org",
"code": "{each}"
},
"performer": {
"identifier": {
"system": "http://terminology.hl7.org/CodeSystem/NCPDPProviderIdentificationNumber",
"value": "0999017"
},
"display": "Our Pharmacy"
}
}
}
93 changes: 93 additions & 0 deletions fhirResourcesToLoad/rems_snow_medicationrequest_addyi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"resourceType": "MedicationRequest",
"id": "pat017-mr-addyi",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "1666386",
"display": "Addyi 100 MG Oral Tablet"
},
{
"system": "http://hl7.org/fhir/sid/ndc",
"code": "58604-214-03"
}
]
},
"status": "active",
"intent": "order",
"subject": {
"reference": "Patient/pat017",
"display": "Jon Snow"
},
"authoredOn": "2024-02-29",
"requester": {
"reference": "Practitioner/pra1234",
"display": "Jane Doe"
},
"reasonCode": [
{
"coding": [
{
"system": "http://snomed.info/sct",
"code": "270903007",
"display": "Hypoactive sexual desire disorder (HSDD)"
}
]
}
],
"insurance": [
{
"reference": "Coverage/cov017"
}
],
"dosageInstruction": [
{
"sequence": 1,
"text": "100mg before bed",
"timing": {
"repeat": {
"frequency": 1,
"period": 1,
"periodUnit": "d"
}
},
"route": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "26643006",
"display": "Oral route (qualifier value)"
}
]
},
"doseAndRate": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/dose-rate-type",
"code": "ordered",
"display": "Ordered"
}
]
},
"doseQuantity": {
"value": 100,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
]
}
],
"dispenseRequest": {
"quantity": {
"value": 28,
"system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
"code": "TAB"
},
"numberOfRepeatsAllowed": 2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"system": "http://snomed.info/sct",
"code": "2183126",
"display": "Product containing only turaliio"
"display": "Product containing only turalio"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ protected void initialize() throws ServletException {
setPagingProvider(databaseBackedPagingProvider);

/*
* This interceptor formats the output using nice colourful
* This interceptor formats the output using nice colorful
* HTML output when the request is detected to come from a
* browser.
*/
Expand Down Expand Up @@ -419,7 +419,7 @@ protected void initialize() throws ServletException {
private ServerConformanceR4 createConformance(RestfulServer theRestfulServer, IFhirSystemDao<Bundle, Meta> theSystemDao, DaoConfig theDaoConfig, ISearchParamRegistry theSearchParamRegistry, IValidationSupport theValidationSupport){
ServerConformanceR4 con = new ServerConformanceR4(theRestfulServer, theSystemDao,
theDaoConfig, theSearchParamRegistry, theValidationSupport);
// this isnt autowiring so force it.
// this isn't autowiring so force it.
myApplicationContext.getAutowireCapableBeanFactory().autowireBean(con);
return con;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.eclipse.jetty.io.ByteBufferOutputStream;
import org.eclipse.jetty.server.Dispatcher;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.server.handler.ErrorHandler;
import org.eclipse.jetty.util.StringUtil;

Expand Down
13 changes: 0 additions & 13 deletions src/main/java/org/hl7/codex/rems/script/Message.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package org.hl7.codex.rems.script;

//import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlElement;

@XmlRootElement(name="Message")
//public class Message implements Serializable {
public class Message {
protected Header header;
//protected Body body;

@XmlElement(name="Header")
public Header getHeader() {
Expand All @@ -17,14 +14,4 @@ public Header getHeader() {
public void setHeader(Header header) {
this.header = header;
}

/*
@XmlElement(name="Body")
public Body getBody() {
return body;
}
public void setBody(Body body) {
this.body = body;
}
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ public class NcpdpScriptController {

private static final String APPLICATION_XML = "application/xml";

@Autowired
private org.springframework.core.env.Environment environment;

@Autowired
private JpaRestfulServer jpaRestfulServer;

Expand Down Expand Up @@ -59,7 +56,7 @@ public RxFillStatusMessage getScriptResponse(@RequestBody RxFillMessage payload)
RequestDetails requestDetails = new SystemRequestDetails();
requestDetails.setRequestId(header.getPrescriberOrderNumber());

// retrieve the MedicationRequeest
// retrieve the MedicationRequest
MedicationRequest medicationRequest = null;
try {
medicationRequest = medicationRequestDao.read(id, requestDetails);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void getAuth(@RequestParam Map<String, String> reqParamValue, HttpServlet
* passed in by the request to associate the request with a launch id, and uses that launch id
* to append extra parameters to the token response.
* @param body - Custom object to serialize the incoming request body
* @return - returns the custom built reponse
* @return - returns the custom built response
*/
@PostMapping(value = "/token", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public ResponseEntity<TokenResponse> getToken(TokenRequest body) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
package org.hl7.davinci.ehrserver.authproxy;

import org.hl7.davinci.ehrserver.requestgenerator.database.Key;

public interface PayloadDAO {

public void createPayload(Payload payload);


// create a new user record in the users table
// public void create(String launchId, String launchUrl, String patientId, String template, String request);

// get a user with the passed id
public Payload getPayload(String id);


// update launch id to be a code
public void updateCode(String launchId, String code);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.hl7.davinci.ehrserver.authproxy;

import org.hl7.davinci.ehrserver.requestgenerator.database.Key;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import org.hl7.fhir.r4.model.Enumerations.PublicationStatus;
import org.hl7.fhir.r4.model.Enumerations.SearchParamType;

import java.util.ArrayList;
import java.util.List;

import org.hl7.fhir.r4.model.Enumeration;
import org.hl7.fhir.r4.model.SearchParameter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.hl7.davinci.ehrserver.requestgenerator.database;

import javax.sql.DataSource;
import java.util.List;

public interface KeyDAO {

public void createKey(Key key);


// create a new user record in the users table
public void create(String id, String e, String n, String kty);

Expand Down
Loading

0 comments on commit 72560f9

Please sign in to comment.