@Role
public interface MatchStorageManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
addNote(List<PatientMatch> matches,
String note)
Saves a note to all matches in
matches. |
boolean |
deleteMatchesForLocalPatient(String patientId)
Deletes all matches (including those that users have been notified about, and MME matches)
for the given local patient.
|
List<PatientMatch> |
getMatchesToBePlacedIntoNotificationTable(List<PatientSimilarityView> matches)
Converts a list of local SimilarityViews into a list of PatientMatches, keeping only those matches
which should be saved into the notification table (i.e.
|
Long |
getNumberOfRemoteMatches()
Calculates the number of matches that were found by all remote outgoing/incoming requests where at least one
patient in the match is remote.
|
List<PatientMatch> |
loadMatches(double score,
double phenScore,
double genScore,
boolean onlyCurrentUserAccessible,
Timestamp fromDate,
Timestamp toDate)
Loads matches filtered by the parameters.
|
List<PatientMatch> |
loadMatchesBetweenPatients(String patientId1,
String serverId1,
String patientId2,
String serverId2)
Load all matches where reference/matched patient ID is same as one of parameters.
|
List<PatientMatch> |
loadMatchesByIds(Set<Long> matchesIds)
Load all matches with ids in
matchesIds. |
boolean |
saveComment(List<PatientMatch> matches,
String comment)
Saves comment to all matches in
matches to a passed status string. |
boolean |
saveLocalMatches(List<PatientMatch> matches,
String patientId)
Saves a list of local matches.
|
boolean |
saveRemoteMatches(List<? extends PatientSimilarityView> similarityViews,
String patientId,
String serverId,
boolean isIncoming)
Saves a list of matches that were found by a remote outgoing/incoming request.
|
boolean |
setNotifiedStatus(List<PatientMatch> matches,
boolean isNotified)
Marks all matches in
matches as notified or not notified. |
boolean |
setStatus(List<PatientMatch> matches,
String status)
Sets status to all matches in
matches to a passed status string. |
boolean |
setUserContacted(List<PatientMatch> matches,
boolean isUserContacted)
Marks all matches with ids in
matchesIds as user-contacted or not. |
boolean |
updateNotes(PatientMatch match,
String note)
Updates match notes string property with new note record.
|
boolean |
updateNotificationHistory(PatientMatch match,
org.json.JSONObject notificationRecord)
Updates a notification history JSON log string with new notification record.
|
List<PatientMatch> loadMatches(double score, double phenScore, double genScore, boolean onlyCurrentUserAccessible, Timestamp fromDate, Timestamp toDate)
score - threshold for matchesphenScore - only matches with phenotypical score higher or equal to this value are returnedgenScore - only matches with genotypical score higher or equal to this value are returnedonlyCurrentUserAccessible - when true only matches that current user has access to are returnedfromDate - if passed a date, then only matches found on or after this date will be returned;
if null, then no lower limit on the match date is consideredtoDate - if passed a date, then only matches found on or before this date will be returned;
if null, then no upper limit on the match date is consideredList<PatientMatch> loadMatchesByIds(Set<Long> matchesIds)
matchesIds.matchesIds - list of ids of matches to loadList<PatientMatch> loadMatchesBetweenPatients(String patientId1, String serverId1, String patientId2, String serverId2)
patientId1 - id of reference/matched patient to load matches forserverId1 - id of the server that hosts patientId1patientId2 - id of reference/matched patient to load matches forserverId2 - id of the server that hosts patientId2boolean setNotifiedStatus(List<PatientMatch> matches, boolean isNotified)
matches as notified or not notified.matches - list of matches to mark as notified.isNotified - boolean notified status to set for matchesboolean setUserContacted(List<PatientMatch> matches, boolean isUserContacted)
matchesIds as user-contacted or not.matches - list of matches to mark as user-contacted.isUserContacted - boolean user-contacted status to set for matchesboolean setStatus(List<PatientMatch> matches, String status)
matches to a passed status string.matches - list of matches to mark as notified.status - whether the matches should be marked as saved, rejected or uncategorizedboolean saveComment(List<PatientMatch> matches, String comment)
matches to a passed status string.matches - list of matches to save comment.comment - comment textboolean addNote(List<PatientMatch> matches, String note)
matches.matches - list of matches to save note to.note - note textboolean deleteMatchesForLocalPatient(String patientId)
patientId - local patient ID for whom to delete matches.@Unstable List<PatientMatch> getMatchesToBePlacedIntoNotificationTable(List<PatientSimilarityView> matches)
matches - a list of matches assumed ot be matches between local patientsboolean saveLocalMatches(List<PatientMatch> matches, String patientId)
matches - list of similarity viewspatientId - local patient ID for whom to save matchesboolean saveRemoteMatches(List<? extends PatientSimilarityView> similarityViews, String patientId, String serverId, boolean isIncoming)
similarityViews - list of similarity viewspatientId - remote patient ID for whom to save matchesserverId - id of remote serverisIncoming - whether we are saving results of incoming (then true) or outgoing requestLong getNumberOfRemoteMatches()
boolean updateNotificationHistory(PatientMatch match, org.json.JSONObject notificationRecord)
match - subject matchnotificationRecord - the new notification record JSONboolean updateNotes(PatientMatch match, String note)
match - subject matchnote - the new note record JSON stringCopyright © 2011–2019 University of Toronto, Computational Biology Lab. All rights reserved.