Giter Club home page Giter Club logo

api-server's People

Contributors

ascooper57 avatar cmoesel avatar dmpotter44 avatar eedrummer avatar gotdan avatar jiffyjeff avatar jmandel avatar rakeshadk7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-server's Issues

POST example

Josh,
I got the server running. However, when I try to POST Patient-example.xml with command:

curl 'h0/DiagnosticOrder/example' -X PUT -H 'Authorization: Basic Y2xpZW50OnNlY3JldA=='-H 'Content-Type: text/xml' --data @grails-app/conf/examples/Patient-example.xml

I get this message:
Warning: Couldn't read data from file
Warning: "grails-app/conf/examples/Patient-example.xml", this makes an empty
Warning: POST.

curl: (6) Couldn't resolve host 'Content-Type: text'

On the server side, I see this:
Evaluating request org.apache.catalina.core.ApplicationHttpRequest@f62d719 with null
Formats: xml + xml
errors.GrailsExceptionResolver IOException occurred when processing request: [PUT] /DiagnosticOrder/example
Stream closed. Stacktrace follows:
java.io.IOException: Stream closed
at fhir.ApiController.parseResourceFromRequest(ApiController.groovy:131)
at fhir.ApiController.update(ApiController.groovy:149)
at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
fhir.ErrorController Rendering a 500 error
fhir.ResponseFilters rendered after: 14

Any pointers? Thank you for the help!

Latest implementation of FHIR removes xpath from the Conformance resource

At present, smart-on-fhir uses the XPath found in the Conformance resource to build search indexes to enable searching the documents it stores. Unfortunately, the latest version of FHIR (me.fhir:fhir-0.12:0.2) removes this XPath, meaning that grails-app/conf/profile.xml can't be parsed when using the latest version of FHIR. As the information stored in that resource is used by the SearchIndexService to determine how to provide search information, this effectively breaks smart-on-fhir.

I'm not entirely clear on whether this information is entirely removed from the FHIR spec or just moved to a different location, but it does present an issue moving forward.

Abstract "token" into an authorization object

Should merge authorization data from the auth server's token introspection endpoint with (nominal) data about users and their actual permissions. This would encapsulate:

  • allowed compartments
  • user details
  • authorization scopes

smart-on-fhir/api-server: URL "Sample Patients:" points to old sample data project

https://github.com/smart-on-fhir/api-server

URL "Sample Patients:" point to https://github.com/chb/smart_sample_patients/tree/fhir

should be https://github.com/smart-on-fhir/sample-patients

Getting more sample data

You can load sample data from SMART's Sample Patients:

$ sudo apt-get install python-jinja2
$ git clone --recursive https://github.com/smart-on-fhir/sample-patients
$ cd sample-patients/bin
$ git checkout fhir
$ python generate.py --write-fhir ../generated-data
$ ls ../generated-data # a bunch of XML files

FHIR `read` on non-existing resource returns 404 with HTML

I'm getting the following response with this call (but would expect an OperationOutcome in JSON):

curl -H "Accept: application/json+fhir" https://fhir-open-api-dstu2.smarthealthit.org/Patient/xxx
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /WEB-INF/grails-app/views/api/read.jsp. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>

URL value mismatch in the fhir response bundle

The "url" value in the fhir response bundle inside the attribute "link" refers to a different port(9080), however the grails-app is running on port 8080(default) inside tomcat using the gradle wrapper...

image

Unable to update the records on your server

I am trying to update the record in the FHIR server it is throwing me following exception with 500 status. I am not sure some this is missing.
Below is the Exception I am getting

" Exception in thread "main" java.io.IOException: Server returned HTTP response code: 500 for URL: http://fhir.dev.aimsplatform.com/Patient/1272431_format=xml
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.test.HttpURLConnectionExample.updatePatientRecord(HttpURLConnectionExample.java:157)
at com.test.HttpURLConnectionExample.main(HttpURLConnectionExample.java:30)"

Following is the code snippet I am using. Please help me on this

//update particular patient record
private void updatePatientRecord(int PatientID) throws Exception {

        String url = "http://fhir.dev.aimsplatform.com/Patient/" + PatientID +"_format=xml";            
        //PUT https://example.com/path/{resourceType}/{id}

        URL obj = new URL(url);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();

         String authStr = "client"+":"+"secret";
            System.out.println("Original String is " + authStr);

        // encode data on your side using BASE64
            byte[] bytesEncoded = Base64.getEncoder().encode(authStr .getBytes());
            String authEncoded = new String(bytesEncoded);
            con.setRequestProperty("Authorization", "Basic "+authEncoded);  
        // optional default is PUT
        con.setRequestMethod("PUT");  


        con.setDoOutput(true);
        con.setDoInput(true);
        con.setRequestProperty("Content-Type", "application/json");
        con.setRequestProperty("Accept", "application/json");             

        JSONObject details = new JSONObject();      

        details.put("city","california");
        details.put("country","usa");

        OutputStreamWriter wr= new OutputStreamWriter(con.getOutputStream());
        wr.write(details.toString());;
        wr.flush(); 


         InputStream ins = con.getInputStream();
         InputStreamReader isr = new InputStreamReader(ins);
         BufferedReader in = new BufferedReader(isr);

         //output the information        

         String inputLine;
         while ((inputLine = in.readLine()) != null)
         {
             System.out.println(inputLine);
         }
         in.close();
    }

oauth

•Turn authentication or off with fhir.oauth.enabled : true | false

Where do we pass this flag or add this flag? I tried to pass it on the command line as:

./grailsw run-app --fhir-oauth.enabled:false

That did not work and got an error about oauth not being setup.

Thanks!

_sort order in queries

Consider support for ordered results. May need to derive the order client-side, or split resourceIndex into resource-specific collections (because MongoDB has a limit of 64 indexes per collection, and while k:v works for search queries via $elemMatch, it doesn't work for sort.)

Load SMART sample data

Add a set of SMART export scripts for FHIR... at least for

  • Meds
  • Problems
  • Labs
  • Vitals
  • Demographics

Port the static CCDA Receiver UI and apps

Rewrite the main UI to launch with administration level privileges and support listing patients, arching, launching an app on a record...

Port growth chart, Cardiac Risk, BP Centiles, and time permitting, med rec depending on how lists can be handled.

FHIR DSTU3 issue

Hello,

Our organization just went from DSTU2 to DSTU3. In the DSTU2 version the encounter object has a method "class_" that accepts an enumeration of consisting of states of the patient such as "Inpatient", "Outpatient","Ambulatory", etc... The DSTU3 version has modified the class_ method to take a Coding object that consists of a CodeID(string) and DisplayText (string). So the question is, with the enumeration gone, how are the states to be persisted in this Coding object? We certainly cannot rely on a string for determining state as there may be a plethora of fat fingered patient states hydrating the object.

Build an app that acts as a FHIR client

rather than hard-coding the UI into the server. Ideally this would handle

  • consuming a conformance profile or defaulting to a full feature set

  • list available resources + calls

  • support auto-population of search params

  • errors

  • content-types

    Should be totally client-side using CORS requests -- but should also have a built-in server side pure proxy to support interaction with non-CORS FHIR servers.

OperationOutcome does not honor Accept header

I noticed our API server doesn't honor Accept: application/json+fhir and just returns an XML formatted OperationOutcome.

To replicate using HTTPie:

http https://fhir-api-dstu2.smarthealthit.org/Patient family==Argonaut given==Jason Authorization:"Bearer xOoZyp" Accept:application/json+fhir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.