@Unstable
@Role
public interface PushPatientService
Note: unlike PushPatientData this service checks that the currently logged in user has permissions to push
the patient or view the patient representation in JSON.
| Modifier and Type | Method and Description |
|---|---|
Set<PushServerInfo> |
getAvailablePushTargets() |
org.json.JSONObject |
getLocalPatientJSON(String patientID,
String exportFieldListJSON)
Returns the (specified subset of) patient data in JSON format.
|
PatientPushHistory |
getPatientPushHistory(String localPatientID,
String remoteServerIdentifier) |
PushServerGetPatientIDResponse |
getPatientURL(String remoteServerIdentifier,
String remotePatientGUID) |
PushServerGetPatientIDResponse |
getPatientURL(String remoteServerIdentifier,
String remotePatientGUID,
String remoteUserName,
String password) |
Map<PushServerInfo,PatientPushHistory> |
getPushTargetsWithHistory(String localPatientID) |
PushServerConfigurationResponse |
getRemoteConfiguration(String remoteServerIdentifier)
Same as above, but uses the previously stored remote user name and login token to authenticate on the remote
server.
|
PushServerConfigurationResponse |
getRemoteConfiguration(String remoteServerIdentifier,
String remoteUserName,
String password,
boolean saveUserToken)
Retrieves the list of patient fields accepted by the remote server as well as the list of groups the given remote
user is a member of on the remote server.
|
String |
getRemoteUsername(String remoteServerIdentifier)
Get the previously stored remote username associated with the current user and the given remote server
|
void |
removeStoredLoginTokens(String remoteServerIdentifier)
Removes stored remote login token, if any - for security purposes
|
PushServerSendPatientResponse |
sendPatient(String patientID,
String exportFieldListJSON,
String patientState,
String groupName,
String remoteGUID,
String remoteServerIdentifier)
Same as above, but uses the previously stored remote user name and login token to authenticate on the remote
server.
|
PushServerSendPatientResponse |
sendPatient(String patientID,
String exportFieldListJSON,
String patientState,
String groupName,
String remoteGUID,
String remoteServerIdentifier,
String remoteUserName,
String password)
Submits the specified subset of patient data to the specified remote server.
|
Set<PushServerInfo> getAvailablePushTargets()
Map<PushServerInfo,PatientPushHistory> getPushTargetsWithHistory(String localPatientID)
PatientPushHistory getPatientPushHistory(String localPatientID, String remoteServerIdentifier)
org.json.JSONObject getLocalPatientJSON(String patientID, String exportFieldListJSON)
null all
available data is returned.patientID - PhenoTips Patient IDexportFieldListJSON - a string in the JSON array format with the list of fields which should be included in
the output. When not null only patient data fields listed will be serialized.String getRemoteUsername(String remoteServerIdentifier)
null if none is storedPushServerConfigurationResponse getRemoteConfiguration(String remoteServerIdentifier, String remoteUserName, String password, boolean saveUserToken)
remoteServerIdentifier - server name as configured in TODOremoteUserName - user name on the remote serverpassword - user password on the remote serversaveUserToken - save userLoignToken received from the remote server or not. The user may not wish to
compromise his account on the remote server if someone gets access to the account on the local server
Returns null if no response was received from the server (e.g. a wrong server IP, a network
problem, etc.)
PushServerConfigurationResponse getRemoteConfiguration(String remoteServerIdentifier)
PushServerConfigurationResponse equivalent to the "incorrect password" response. Otherwise see
the docs for the other version.void removeStoredLoginTokens(String remoteServerIdentifier)
remoteServerIdentifier - PushServerSendPatientResponse sendPatient(String patientID, String exportFieldListJSON, String patientState, String groupName, String remoteGUID, String remoteServerIdentifier, String remoteUserName, String password)
A new remote patient will be created with each submission, unless remoteGUID is provided, and a patient with the given GUID exists on the remote server and owned by the given group and is authored by the given user - in which case remote patient will be updated (only the submitted fields)
patientID - local patient to be pushed to the remove serverexportFieldListJSON - patient fields to be pushed, as a string representing a JSON array. When not
null only patient data fields listed will be pushed. When null, all available data
fields will be pushed.patientState - a JSON encoded as a String, containing (meta) information about the state of the
patient's record.groupName - group name (optional, can be null)remoteGUID - if a remote patient with the same GUID exists and is owned by the given group and is authored
by the given user patient data will be updated instead of creating a new patient (optional, can be
null)remoteServerIdentifier - server name as configured in TODOremoteUserName - user name on the remote serverpassword - user password on the remote server. Ignored if user_token is not null.PushServerSendPatientResponse.
Returns null if no response was received from the server (e.g. a wrong server IP, a network
problem, etc.)
PushServerSendPatientResponse sendPatient(String patientID, String exportFieldListJSON, String patientState, String groupName, String remoteGUID, String remoteServerIdentifier)
PushServerSendPatientResponse equivalent to the "incorrect password" response. Otherwise see the
docs for the other version.PushServerGetPatientIDResponse getPatientURL(String remoteServerIdentifier, String remotePatientGUID)
remoteServerIdentifier - remotePatientGUID - PushServerGetPatientIDResponse getPatientURL(String remoteServerIdentifier, String remotePatientGUID, String remoteUserName, String password)
Copyright © 2011–2016 University of Toronto, Computational Biology Lab. All rights reserved.