Difference between revisions of "Embed-apps-1 Embedding apps in patient tracker"

From mn/ifi/inf5750
Jump to: navigation, search
(Source Code Repositories)
 
(36 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
= Overview  =
 
= Overview  =
  
We are going to embed web apps into the patient tracker, and implement some new functionality into the patient dashboard. Posible functionalities can be:
+
We are going to embed web apps into the patient tracker, and implement some new functionalities.
*New input fields
 
*New search functionality
 
*Geolocation of patient
 
*Image of patient
 
*Weight history of patient (graph view)
 
*Gestational age (how far is the pregnancy)
 
  
We have not yet decided on the functionality.
 
  
 
= Features =
 
= Features =
== Weight graph ==
+
==== Weight graph ====
== Gestational age ==
+
A graph showing the weight history of a patient enrolled in the MNCH/PNC (Adult Woman) program <br /><br />
 +
<!-- <s>==== Gestational age ====</s>
 +
<s>Display the gestational age of the patient</s> -->
 +
 
 +
 
 +
= Work distribution =
 +
We have been working a lot together on one computer using pair programming, where one person has written the code and the others have been researching how to do things.
 +
 
 +
 
 +
= Screenshot =
 +
[[File:webapp.png|700px|thumb|left|Showing a graph in DHIS]]
 +
= What we have learned through the project =
 +
*JavaScript and JQuery
 +
*Using a REST API
 +
*Some insight in DHIS 2
 +
 
 +
 
 +
= Suggested improvements of DHIS 2 API =
 +
Better documentation of the API (possibly using a data model to show the relationships between the different resources)
 +
 
 +
 
 +
= Source Code Repositories =
 +
*DHIS changes https://code.launchpad.net/~embed-apps-1/dhis2-academy/embed-apps-1-dhis
 +
*App https://code.launchpad.net/~embed-apps-1/dhis2-academy/embed-apps-1-webapp
 +
 
 +
= TODO =
 +
*<s>Embedd app on patient dashboard.</s>
 +
*<s>Use hard coded values to call api at first.</s>
 +
*<s>Use dynamically fethed data to call api.</s>
 +
*<s>Download and build trunk</s>
 +
*<s>Run/test</s>
 +
*<s>Copy changes from PatientDashboard</s>
 +
*Investigate open question (see below)
 +
*Try to change from highcharts to nvd3
 +
 
 +
= Open question =
 +
*Which events should we use if the person is enrolled in multiple programs?
 +
 
 +
= How to get the weight using the API =
 +
Get event with: <br />
 +
http://apps.dhis2.org/dev/api/events.json?orgUnit=DiszpKrYNg8&program=uy2gU8kT1jF&programStage=eaDHS084uMp&startDate=2000-01-01&endDate=2013-12-01&person=fSofnQR6lAU <br />
 +
http://apps.dhis2.org/dev/api/events.json?orgUnit=DiszpKrYNg8&program=uy2gU8kT1jF&programStage=eaDHS084uMp&startDate=2000-01-01&endDate=2013-12-01&person=fSofnQR6lAU
 +
 
 +
If we use the call above without specifying programStage we get all program stages.
 +
 
 +
We can then loop through all programStages (each element in the eventList array in the result), and look for the weight (that is the element in dataValues with dataElement: "UXz7xuGCEhU")
 +
 
 +
 
 +
 
 +
Weight id:
 +
UXz7xuGCEhU
 +
 
 +
= Time schedule =
 +
* <s>01. nov: Finish wiki page</s>
 +
* <s>8. nov: Static web application</s>
 +
* <s>15. nov: Make web app uploadable</s>
 +
* <s>30. nov: Milestone 3</s>
 +
* 08. dec: Final delivery

Latest revision as of 18:50, 6 December 2013

Group Members

  • Zahra Maslavi
  • Torbein Rein
  • Øystein Gammersvik


Overview

We are going to embed web apps into the patient tracker, and implement some new functionalities.


Features

Weight graph

A graph showing the weight history of a patient enrolled in the MNCH/PNC (Adult Woman) program


Work distribution

We have been working a lot together on one computer using pair programming, where one person has written the code and the others have been researching how to do things.


Screenshot

Showing a graph in DHIS

What we have learned through the project

  • JavaScript and JQuery
  • Using a REST API
  • Some insight in DHIS 2


Suggested improvements of DHIS 2 API

Better documentation of the API (possibly using a data model to show the relationships between the different resources)


Source Code Repositories

TODO

  • Embedd app on patient dashboard.
  • Use hard coded values to call api at first.
  • Use dynamically fethed data to call api.
  • Download and build trunk
  • Run/test
  • Copy changes from PatientDashboard
  • Investigate open question (see below)
  • Try to change from highcharts to nvd3

Open question

  • Which events should we use if the person is enrolled in multiple programs?

How to get the weight using the API

Get event with:
http://apps.dhis2.org/dev/api/events.json?orgUnit=DiszpKrYNg8&program=uy2gU8kT1jF&programStage=eaDHS084uMp&startDate=2000-01-01&endDate=2013-12-01&person=fSofnQR6lAU
http://apps.dhis2.org/dev/api/events.json?orgUnit=DiszpKrYNg8&program=uy2gU8kT1jF&programStage=eaDHS084uMp&startDate=2000-01-01&endDate=2013-12-01&person=fSofnQR6lAU

If we use the call above without specifying programStage we get all program stages.

We can then loop through all programStages (each element in the eventList array in the result), and look for the weight (that is the element in dataValues with dataElement: "UXz7xuGCEhU")


Weight id: UXz7xuGCEhU

Time schedule

  • 01. nov: Finish wiki page
  • 8. nov: Static web application
  • 15. nov: Make web app uploadable
  • 30. nov: Milestone 3
  • 08. dec: Final delivery