Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2016] Don't repeatedly attempt login with an incorrect password #275

Open
wants to merge 84 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
f518a23
Project organized and pt-br translation started
TeixeiraRafael Oct 26, 2015
a11845f
Strings.xml traduzido (necessita revisão)
TeixeiraRafael Nov 17, 2015
87e476c
Enable multidex to temporarily avert the dexocalypse.
capnfabs Jan 19, 2016
3e89deb
This fixes #225
llvasconcellos Jan 19, 2016
e370170
Merge pull request #220 from capnfabs/fix/avert-the-dexocalypse
capnfabs Jan 20, 2016
e936762
Make start and stop (end) times for cell accessible via javascript
dancunningham Jan 20, 2016
c234d9e
Add a notes panel to the patient chart screen.
capnfabs Jan 19, 2016
ae6c623
Merge pull request #228 from projectbuendia/feature/dan-fix-5g-line
llvasconcellos Jan 21, 2016
81e5abc
Merge pull request #229 from capnfabs/feature/notes-panel
llvasconcellos Jan 21, 2016
561a0cd
Merge pull request #226 from projectbuendia/fix/llvasconcellos-fix-or…
llvasconcellos Jan 21, 2016
4f44bab
this fixes #224
llvasconcellos Jan 21, 2016
38844c0
Merge pull request #231 from projectbuendia/fix/llvasconcellos-fix-ob…
llvasconcellos Jan 21, 2016
d197f90
This fixes #203
llvasconcellos Jan 21, 2016
477823f
Merge pull request #232 from projectbuendia/fix/llvasconcellos-fix-ob…
llvasconcellos Jan 21, 2016
045cd2f
Tweak notes panel to take up less space
capnfabs Jan 22, 2016
d8b3f88
Allow empty sections in ODK forms.
capnfabs Jan 22, 2016
8f3b811
Fix test compilation
capnfabs Jan 22, 2016
7c8e46e
This fixes #89
llvasconcellos Jan 24, 2016
125d7f2
Enable like search.
llvasconcellos Jan 25, 2016
6c396a9
Merge pull request #237 from capnfabs/fix/199
capnfabs Jan 25, 2016
cd25dbf
Merge pull request #238 from capnfabs/fix/tests
capnfabs Jan 25, 2016
4aea7c8
Move function to chart.js
llvasconcellos Jan 25, 2016
714f8f4
Merge pull request #241 from projectbuendia/fix/llvasconcellos-fix-re…
llvasconcellos Jan 25, 2016
c320243
Merge pull request #243 from projectbuendia/fix/llvasconcellos-enable…
llvasconcellos Jan 25, 2016
d80a9e2
Fixes after discussion on PR.
capnfabs Jan 25, 2016
838f43d
Merge pull request #236 from capnfabs/feature/notes_tweaks
capnfabs Jan 25, 2016
529a8e4
Prevent chart from refreshing unless patient data has changed.
capnfabs Jan 26, 2016
eac1dc6
Merge pull request #239 from capnfabs/fix/chart-refreshes-too-agressi…
capnfabs Jan 26, 2016
ca970b8
UI support for setting custom start dates on Orders.
capnfabs Jan 27, 2016
8a7b444
Use BigToast to display the "note submit failed" toast.
capnfabs Jan 27, 2016
1c9609a
Tweaks to View Observations dialog
dancunningham Jan 27, 2016
cf2eb97
Fix string thing
dancunningham Jan 27, 2016
29bce56
Maybe fix
dancunningham Jan 27, 2016
29efe21
Temporarily disable the red network error toast
capnfabs Jan 27, 2016
73a09e2
Merge pull request #246 from projectbuendia/feature/dan-tweaks
capnfabs Jan 27, 2016
c386657
Merge pull request #250 from capnfabs/fix/disable-red-toast
llvasconcellos Jan 27, 2016
f173053
Merge pull request #249 from capnfabs/fix/📔✏️-notes-text-size
llvasconcellos Jan 27, 2016
99dbb4c
Merge pull request #248 from capnfabs/feature/backdate-orders
llvasconcellos Jan 27, 2016
1a34784
Update observations from Xform submission response.
capnfabs Jan 28, 2016
3ec2c4f
Use dark, ancient magic to ensure that seconds are set for form entries.
capnfabs Jan 28, 2016
1c9d77f
Merge pull request #257 from capnfabs/fix/125-part-2
llvasconcellos Jan 28, 2016
34da213
Restore old temporary-observations-from-xforms logic.
capnfabs Jan 29, 2016
c96983f
Merge pull request #256 from capnfabs/fix/125
capnfabs Jan 29, 2016
04bcebb
Persistent fields - defined select_multiple fields for Diagnoses pers…
dancunningham Jan 29, 2016
0283c0b
Clean up unused UUIDs
dancunningham Feb 1, 2016
99e9505
Load concept names from OpenMRS concepts for persistent fields - no m…
dancunningham Feb 1, 2016
2071a6d
Fixes #177: "Sorry, form save failed: Index 0 requested..."
capnfabs Feb 1, 2016
d372d37
Merge pull request #259 from capnfabs/fix/177
capnfabs Feb 1, 2016
250c190
Merge pull request #258 from projectbuendia/feature/dan-persistent-fi…
dancunningham Feb 1, 2016
f10327a
Add Admission tiles fields to persistent fields list
dancunningham Feb 4, 2016
2066db1
Fix the bug where observations don't reliably when submitting forms.
capnfabs Feb 5, 2016
e2a56db
Add a script that makes a "release-ish" build.
capnfabs Feb 6, 2016
3ece757
Turn off package server check.
capnfabs Feb 8, 2016
1551c44
Load title for Notes Panel from concept dictionary.
capnfabs Feb 8, 2016
8c21cd7
Disable the observations popup for tiles with multiple concepts.
capnfabs Feb 8, 2016
1a564e0
Add default formatting for yes/no/unknown fields
capnfabs Feb 8, 2016
e5db099
Translate all strings to French.
capnfabs Feb 8, 2016
63e5e4b
Merge pull request #263 from capnfabs/fix/translations
capnfabs Feb 8, 2016
5786daf
Merge pull request #262 from capnfabs/fix/observations-dont-appear
capnfabs Feb 8, 2016
d56fbff
Merge pull request #260 from capnfabs/feature/build-releaseish
capnfabs Feb 8, 2016
aa14d53
Merge pull request #264 from capnfabs/fix/disable-package-check
capnfabs Feb 8, 2016
e74d309
Merge pull request #265 from capnfabs/fix/disable-popup-for-multiple-…
capnfabs Feb 8, 2016
ea9f7c1
Merge pull request #266 from capnfabs/feature/yes_no_unknown-defaults
capnfabs Feb 8, 2016
8f1abe8
Merge pull request #267 from capnfabs/fix/notes-panel-label-from-concept
capnfabs Feb 8, 2016
5835bbf
Fix "Void Observations" so that it actually works.
capnfabs Feb 8, 2016
a119172
Merge pull request #268 from capnfabs/fix/delete-obs
capnfabs Feb 8, 2016
d876679
Fix a crash relating to displaying forms with persistent fields.
capnfabs Feb 8, 2016
3a575e4
Fix a french translation
capnfabs Feb 8, 2016
f2daa90
Merge pull request #269 from capnfabs/fix/french-command-translation
capnfabs Feb 8, 2016
13df253
Merge pull request #270 from capnfabs/fix/crash-form-load-profile-switch
capnfabs Feb 8, 2016
1009ceb
Restore clickability for all tiles with 1 concept.
capnfabs Feb 9, 2016
32e457a
Merge pull request #271 from capnfabs/fix/tiles-click
capnfabs Feb 9, 2016
bb89a83
Hide Search by ID
dancunningham Feb 10, 2016
c45e6ae
Fix focusing on first empty field in New/Edit Patient dialog
dancunningham Feb 10, 2016
990b375
Remove days since symptom onset and replace it with weight
dancunningham Feb 10, 2016
5dbb265
Fix css colours in formats
dancunningham Feb 10, 2016
57f0184
Change English label to weight (kg)
dancunningham Feb 10, 2016
2d2b806
Merge pull request #188 from TeixeiraRafael/feature/rafaelteixeira_lo…
llvasconcellos Feb 15, 2016
e77db06
Redoing translation.
llvasconcellos Feb 15, 2016
a96a3a2
More translation.
llvasconcellos Feb 16, 2016
07e8f84
finished translating
llvasconcellos Feb 16, 2016
df5b017
final adjustment
llvasconcellos Feb 16, 2016
7d1837b
Merge pull request #274 from projectbuendia/feature/llvasconcellos-pt…
llvasconcellos Feb 16, 2016
3c10a80
Stop health check when wrong password. This fixes #106.
llvasconcellos Feb 17, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ local.properties
.classpath
.settings
.project

# OpenMRS password file.
.openmrs_password
29 changes: 24 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ android {
preDexLibraries = false
javaMaxHeapSize = '4g'
}

// Enable multidex support.
defaultConfig {
multiDexEnabled true
}
}
dependencies {
// Build plugins
Expand All @@ -44,10 +49,9 @@ dependencies {
compile project(':third_party:odkcollect')

// External dependencies
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:support-annotations:22.2.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-annotations:23.1.1'
compile 'com.google.code.gson:gson:2.3' // JSON parser
compile 'com.google.guava:guava:18.0' // Google common libraries
compile 'com.jakewharton:butterknife:5.1.2' // View injection
compile 'com.mcxiaoke.volley:library:1.0.6' // HTTP framework
compile 'com.joanzapata.android:android-iconify:1.0.8' // Font-based icons
Expand All @@ -59,9 +63,14 @@ dependencies {
compile 'com.mitchellbosecke:pebble:1.5.1' // HTML templating
compile 'org.slf4j:slf4j-simple:1.7.12' // HTML templating dependency
compile 'org.apache.commons:commons-lang3:3.4'
// Magic sliding panel that we use for the notes view.
compile 'com.sothree.slidinguppanel:library:3.2.1'

// Testing
androidTestCompile 'com.android.support.test:runner:0.3'
// Explicitly add this dep at 23.1.1, because the above entry depends on 22.2.0, and the
// discrepancy can introduce differences in behaviour between prod and test.
androidTestCompile 'com.android.support:support-annotations:23.1.1'
// Espresso
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-web:2.2'
Expand All @@ -71,6 +80,11 @@ dependencies {
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.0'
androidTestCompile 'com.google.dexmaker:dexmaker:1.0'
androidTestCompile 'org.mockito:mockito-core:1.9.5'

// Multidex.
// NOTE: This is temporary only! See https://slack-files.com/T02T5LNM4-F0JQ1UDRV-716ebe431f
// for more information.
compile 'com.android.support:multidex:1.0.1'
}

apply plugin: 'spoon'
Expand Down Expand Up @@ -170,8 +184,11 @@ logger.info("Default package server root URL: ${packageServerRootUrl}")
logger.info("Database encryption password: ${encryptionPassword}")

android {
compileSdkVersion 21
buildToolsVersion '19.1.0'
compileSdkVersion 23
buildToolsVersion '23.0.2'
// TODO: Port the various health checks to use HttpURLConnection instead and remove this
// dependency.
useLibrary 'org.apache.http.legacy'

sourceSets.main {
jniLibs.srcDir 'libs'
Expand Down Expand Up @@ -231,6 +248,8 @@ android {
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}

lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public void testPatientDetailsLoaded_SetsObservationsOnUi() {
verify(mMockUi).updateTilesAndGrid(
null, recentObservations, allObservations, ImmutableList.<Order> of(), null, null);
verify(mMockUi).updateAdmissionDateAndFirstSymptomsDateUi(null, null);
verify(mMockUi).updateWeightUi(recentObservations);
verify(mMockUi).updateEbolaPcrTestResultUi(recentObservations);
verify(mMockUi).updatePregnancyAndIvStatusUi(recentObservations);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testNewPatient() {

// The symptom onset date should not be assigned a default value.
expectVisible(viewThat(
hasAncestorThat(withId(R.id.attribute_symptoms_onset_days)),
hasAncestorThat(withId(R.id.attribute_weight)),
hasText("–")));

// The admission date should be visible right after adding a patient.
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/assets/chart.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ th, td {
font-size: 1.9rem;
padding-bottom: 3.8rem;
font-weight: bold;
overflow: visible;
}
/*
HACK: freezepanes.js puts a div inside our th, which (because of the rest of our CSS) triggers
overflow: hidden. We don't want this for command buttons, because they're usually rows, so we
explicitly turn it on for the div inside "command" cells.
*/
#grid th[scope="row"].command > div {
overflow: visible;
}

/* Tiles */
Expand Down
28 changes: 23 additions & 5 deletions app/src/main/assets/chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
{% set values = tile.points | values %}
{% set class = values | format_values(tile.item.cssClass) %}
{% set style = values | format_values(tile.item.cssStyle) %}
<td id="tile-{{id}}" class="tile concept-{{id}} {{class}}" onclick="od('{{tile.item.conceptUuids[0]}}','','');" style="{{style}}" width="{{100.0 / tileRow.size}}%">
<td
id="tile-{{id}}"
class="tile concept-{{id}} {{class}}"
{% if tile.item.conceptUuids.size == 1 %}
onclick="od('{{tile.item.conceptUuids[0] }}','','');"
{% endif %}
style="{{style}}"
width="{{100.0 / tileRow.size}}%" >
<div class="heading">{{tile.item.label}}</div>
<div class="value">{{values | format_values(tile.item.format) | line_break_html | raw}}</div>
<div class="caption">{{values | format_values(tile.item.captionFormat) | line_break_html | raw}}</div>
Expand Down Expand Up @@ -49,7 +56,7 @@
<tbody>
<tr>
<th scope="rowgroup">
Observations
{{ string_resource("observations") }}
</th>
{% for column in columns %}
{% if prevColumn is not null and column.start != prevColumn.stop %}
Expand Down Expand Up @@ -77,6 +84,8 @@
{% set class = summaryValue | format_values(row.item.cssClass) %}
{% set style = summaryValue | format_values(row.item.cssStyle) %}
<td id="cell-{{id}}-{{column.start.millis}}"
data-start="{{column.start.millis}}"
data-stop="{{column.stop.millis}}"
class="{{column.start == nowColumnStart ? 'now' : ''}} {{class}}"
style="{{style}}"
onclick="{% if points is not empty%}
Expand All @@ -97,14 +106,22 @@
{% endif %}
</td>
{% endfor %}
<script>
// Hides the row if not required and no observation is recorded.
if (!{{row.item.required}}) {
if (isRowEmpty(document.currentScript.parentNode)) {
document.currentScript.parentNode.style.display = 'none';
}
}
</script>
</tr>
{% endfor %}
</tbody>

<tbody>
<tr>
<th scope="rowgroup">
Treatment Plan
{{ string_resource("treatment_plan_title") }}
</th>
{% for column in columns %}
{% if prevColumn is not null and column.start != prevColumn.stop %}
Expand All @@ -118,7 +135,8 @@
<tr class="order">
<th scope="row" onclick="controller.onOrderHeadingPressed('{{order.uuid}}')">
<div class="medication">{{order.medication}}</div>
<div>{{order.dosage}}&nbsp;</div>
<!-- TODO: make string_resource take format strings and args so we don't need to manually concatenate like this. -->
<div>{{order.dosage}}&nbsp;{{order.frequency != null ? order.frequency + string_resource("times_daily") : ''}}</div>
</th>
{% set previousActive = false %}
{% set future = false %}
Expand Down Expand Up @@ -148,7 +166,7 @@

<tr>
<th scope="row" class="command" onclick="controller.onNewOrderPressed()">
Add a New Treatment
{{ string_resource("treatment_add_new") }}
</th>
</tr>
</tbody>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/assets/chart.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
function isRowEmpty(parentNode) {
var rowEmpty = true;
$(parentNode).find('td').each(function(index, element) {
var innerHtml = element.innerHTML.trim();
if ( innerHtml != "" ) {
rowEmpty = false;
}
});
return rowEmpty;
}

function popup(name, pairs) {
// var dialog = document.getElementById('obs-dialog');
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/org/projectbuendia/client/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
package org.projectbuendia.client;

import android.app.Application;
import android.content.Context;
import android.preference.PreferenceManager;
import android.support.multidex.MultiDex;

import com.facebook.stetho.Stetho;

Expand Down Expand Up @@ -85,6 +87,13 @@ public static synchronized OpenMrsConnectionDetails getConnectionDetails() {
mHealthMonitor.start();
}

@Override
public void attachBaseContext(Context base) {
// Set up Multidex.
super.attachBaseContext(base);
MultiDex.install(this);
}

public void inject(Object obj) {
mObjectGraph.inject(obj);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public class BuendiaApiHealthCheck extends HealthCheck {
private Handler mHandler;
private BuendiaModuleHealthCheckRunnable mRunnable;

private boolean httpUnauthorized;

BuendiaApiHealthCheck(
Application application,
OpenMrsConnectionDetails connectionDetails) {
Expand Down Expand Up @@ -118,6 +120,20 @@ protected int getCheckPeriodMillis() {
? CHECK_PERIOD_MS : FAST_CHECK_PERIOD_MS;
}

@Override
public boolean isApiUnavailable() {
// Prevents continued http request attempts after a 401 http error.
return httpUnauthorized;
}

/** Clears all the issues for this health check. */
@Override
public void clear() {
// Back to original state.
httpUnauthorized = false;
}


private class BuendiaModuleHealthCheckRunnable implements Runnable {
public final AtomicBoolean isRunning;

Expand All @@ -142,32 +158,38 @@ public BuendiaModuleHealthCheckRunnable(Handler handler) {
}

try {
httpGet.addHeader(BasicScheme.authenticate(
new UsernamePasswordCredentials(
mConnectionDetails.getUser(),
mConnectionDetails.getPassword()),
"UTF-8", false));
HttpResponse httpResponse = httpClient.execute(httpGet);
if (httpResponse.getStatusLine().getStatusCode() != HttpURLConnection.HTTP_OK) {
LOG.w("The OpenMRS URL '%1$s' returned unexpected error code: %2$s",
uri, httpResponse.getStatusLine().getStatusCode());
switch (httpResponse.getStatusLine().getStatusCode()) {
case HttpURLConnection.HTTP_INTERNAL_ERROR:
reportIssue(HealthIssue.SERVER_INTERNAL_ISSUE);
break;
case HttpURLConnection.HTTP_FORBIDDEN:
case HttpURLConnection.HTTP_UNAUTHORIZED:
reportIssue(HealthIssue.SERVER_AUTHENTICATION_ISSUE);
break;
case HttpURLConnection.HTTP_NOT_FOUND:
default:
reportIssue(HealthIssue.SERVER_NOT_RESPONDING);
break;
}
if (hasIssue(HealthIssue.SERVER_HOST_UNREACHABLE)){
resolveIssue(HealthIssue.SERVER_HOST_UNREACHABLE);
}
if (httpUnauthorized) {
reportIssue(HealthIssue.SERVER_AUTHENTICATION_ISSUE);
return;
} else {
httpGet.addHeader(BasicScheme.authenticate(
new UsernamePasswordCredentials(
mConnectionDetails.getUser(),
mConnectionDetails.getPassword()),
"UTF-8", false));
HttpResponse httpResponse = httpClient.execute(httpGet);
if (httpResponse.getStatusLine().getStatusCode() != HttpURLConnection.HTTP_OK) {
LOG.w("The OpenMRS URL '%1$s' returned unexpected error code: %2$s",
uri, httpResponse.getStatusLine().getStatusCode());
switch (httpResponse.getStatusLine().getStatusCode()) {
case HttpURLConnection.HTTP_INTERNAL_ERROR:
reportIssue(HealthIssue.SERVER_INTERNAL_ISSUE);
break;
case HttpURLConnection.HTTP_FORBIDDEN:
case HttpURLConnection.HTTP_UNAUTHORIZED:
httpUnauthorized = true;
reportIssue(HealthIssue.SERVER_AUTHENTICATION_ISSUE);
break;
case HttpURLConnection.HTTP_NOT_FOUND:
default:
reportIssue(HealthIssue.SERVER_NOT_RESPONDING);
break;
}
if (hasIssue(HealthIssue.SERVER_HOST_UNREACHABLE)){
resolveIssue(HealthIssue.SERVER_HOST_UNREACHABLE);
}
return;
}
}
} catch (UnknownHostException | IllegalArgumentException e) {
LOG.w("OpenMRS server unreachable: %s", uri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public class DiagnosticsModule {
Application application,
OpenMrsConnectionDetails connectionDetails,
AppSettings settings) {
// TODO: restore PackageServerHealthCheck, we'll probably want that again in the future.
return ImmutableSet.of(
new WifiHealthCheck(application, settings),
new BuendiaApiHealthCheck(application, connectionDetails),
new PackageServerHealthCheck(application, settings));
new BuendiaApiHealthCheck(application, connectionDetails));
}

@Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public final void stop() {
protected abstract void stopImpl();

/** Clears all the issues for this health check. */
public final void clear() {
public void clear() {
mActiveIssues.clear();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
import java.net.UnknownHostException;

/** A {@link HealthCheck} that checks whether the package server is up and running. */
// TODO: restore PackageServerHealthCheck, we'll probably want it again once the packages are
// working on the server.
@SuppressWarnings("unused")
public class PackageServerHealthCheck extends HealthCheck {

private static final Logger LOG = Logger.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
package org.projectbuendia.client.events.data;

import org.projectbuendia.client.events.DefaultCrudEventBus;
import org.projectbuendia.client.models.Encounter;

/**
* An event bus event indicating that adding an encounter failed.
Expand All @@ -21,6 +22,7 @@
public class EncounterAddFailedEvent {
public final Reason reason;
public final Exception exception;
public final Encounter encounter;

public enum Reason {
UNKNOWN,
Expand All @@ -33,7 +35,8 @@ public enum Reason {
FAILED_TO_FETCH_SAVED_OBSERVATION
}

public EncounterAddFailedEvent(Reason reason, Exception exception) {
public EncounterAddFailedEvent(Encounter encounter, Reason reason, Exception exception) {
this.encounter = encounter;
this.reason = reason;
this.exception = exception;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@

import org.joda.time.DateTime;

import java.util.Map;
import java.util.List;

/** JSON representation of an OpenMRS Encounter; call Serializers.registerTo before use. */
public class JsonEncounter {
public String patient_uuid;
public String uuid;
public DateTime timestamp;
public String enterer_id;
/** A {conceptUuid: value} map, where value can be a number, string, or answer UUID. */
public Map<Object, Object> observations;
public List<JsonObservation> observations;
public String[] order_uuids; // orders executed during this encounter
}
Loading