GithubHelp home page GithubHelp logo

mpg-api's Introduction


IST-MPG REST API Samples


Samples API for IST MPG. For additional information please contact support AT istmedical.com Latest Version: 1.5

Change Log


Version 1.5

lun 20 feb 2023 09:05:02 CET

  • Updated file php_examples/upload_report.php
  • Changes in php_examples/config.php to incluide upload report functionality

Version 1.4

Fri Sep 9 11:33:40 CEST 2022

  • Python and PHP samples added

Version 1.3

Wed Sep 8 10:13:15 CEST 2021

  • Curl samples added
  • Moved repository to Github and made public

Code Samples

Curl Samples

Endpoint to generate access Token:

Will provide you with an access token. This token is required to call any other API endpoints.

curl -X POST "https://<host>:<port>/api/token/refreshToken" -H "accept: application/json;charset=UTF-8" -H "Content-Type: application/json;charset=UTF-8" -d "{ \"password\": \"your_password\", \"username\": \"your_username\"}" -k
Sample response
{
  "status": 200,
  "statusMessage": "Token generated correctly",
  "success": true,
  "timestamp": "01/01/2021 11:11:11 AM +0200",
  "results": [
    {
      "token": "token_string",
      "user": "your_username",
      "token_expire_time": "nn"
    }
  ]
}

Endpoint to list available documents, where PID is the Patient ID:

curl -X GET "https://<host>:<port>/api/documents/list?PID=<PID>" -H "accept: application/json;charset=UTF-8" -H "Authorization: Bearer <token>" -k
Sample response
{
  "status": 200,
  "statusMessage": "Record found with PID : nnn",
  "success": true,
  "timestamp": "01/01/2021 11:11:11 AM +0200",
  "results": [
    {
      "PatientData": {
        "PatientName": "xx",
        "PatientID": "nn",
        "BirthDate": "1900-01-01",
        "PatientGenre": ""
      }
    },
    {
      "DocumentList": [
        {
          "IDDOC": "11fd4084-307c-4c2b-8aad-9a8311e9dcda",
          "StudyID": "study_id_number",
          "StudyDate": "20200202",
          "StudyDescription": "Description",
          "DocumentType": "Rich Document",
          "DocumentPages": "number of pages",
          "DocumentSize": "Size in MB",
          "StudyModality": "Modality",
          "ReferringPhysicianName": "Name"
        },
         {
          "IDDOC": "41fd4384-307c-4c2b-8a4d-9a3a1ae9dcdb",
          "StudyID": "study_id_number",
          "StudyDate": "20200202",
          "StudyDescription": "Description",
          "DocumentType": "Rich Document",
          "DocumentPages": "number of pages",
          "DocumentSize": "Size in MB",
          "StudyModality": "Modality",
          "ReferringPhysicianName": "Name"
        }
      ]
    }
  ]
}

Endpoint to download document, given the Document ID (IDDOC):

curl -X GET "https://<host>:<port>/api/documents/download/<IDDOC>" -H "accept: application/json;charset=UTF-8" -H "Authorization: Bearer <token>" -k
Sample response
{
  "status": 200,
  "statusMessage": "Document Found with id : f3e0ecd3-74e3-4c81-a6af-1822a453562e",
  "success": true,
  "timestamp": "01/01/2021 11:11:11 AM +0200",
  "results": [
    {
      "PatientData": {
        "PatientName": "Patient Name",
        "PatientID": "patient_id",
        "BirthDate": "1970-01-01",
        "PatientGenre": ""
      }
    },
    {
      "publicPath": "public_path_of_pdf_document",
      "documentType": "Rich Document"
    }
  ]
}

Python Sample Files

PHP Sample Files

License

These sample project files are licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

mpg-api's People

Contributors

alfonsoist avatar

Watchers

 avatar

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.