public interface PatientMatch
| Modifier and Type | Field and Description |
|---|---|
static org.xwiki.model.reference.EntityReference |
DATA_SPACE
The space where matches data is stored.
|
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONArray |
getComments() |
org.json.JSONArray |
getFeatureMatchesJSON() |
Timestamp |
getFoundTimestamp() |
Double |
getGenotypeScore() |
org.json.JSONArray |
getGenotypeSimilarityJSON() |
String |
getHref() |
Long |
getId() |
PatientInMatch |
getMatched() |
String |
getMatchedDetails() |
String |
getMatchedPatientId() |
String |
getMatchedServerId() |
String |
getNote() |
org.json.JSONArray |
getNotes() |
org.json.JSONObject |
getNotificationHistory() |
Double |
getPhenotypeScore() |
PatientInMatch |
getReference() |
String |
getReferenceDetails() |
String |
getReferencePatientId() |
String |
getReferenceServerId() |
Double |
getScore() |
String |
getStatus() |
boolean |
hasSameMatchData(PatientMatch other)
Checks that matches are equivalent (see
isEquivalent()) and that the match data is the same,
meaning that scores are the same, phenotype/genotype is the same, etc. |
boolean |
isEquivalent(PatientMatch other)
Checks if
other is equivalent to this. |
boolean |
isIncoming()
See
isLocal(). |
boolean |
isLocal()
Checks if a request is local.
|
boolean |
isMatched(String patientId,
String serverId)
Checks if the patient given in parameter is the matched patient of the match.
|
boolean |
isOutgoing()
See
isLocal(). |
boolean |
isReference(String patientId,
String serverId)
Checks if the patient given in parameter is the reference patient of the match.
|
boolean |
isRejected()
Deprecated.
use
getStatus() instead |
void |
setComments(org.json.JSONArray comments)
Sets match comments.
|
void |
setExternallyContacted(boolean isExternallyContacted)
Add a record to the notification history in case user contacted regarding this match outside of PhenomeCentral.
|
void |
setFoundTimestamp(Timestamp timestamp)
Set the timestamp when the match was found.
|
void |
setGenotypeScore(Double score)
Set genotype the score.
|
void |
setMatchedDetails(String details)
Set matched details.
|
void |
setMatchedPatientInMatch(PatientInMatch patient)
Set the matched patient in match.
|
void |
setNotes(org.json.JSONArray notes)
Sets match notes as a JSON object, in the following format:
|
void |
setNotificationHistory(org.json.JSONObject notificationHistory) |
void |
setPhenotypeScore(Double score)
Set the phenotype score.
|
void |
setReferenceDetails(String details)
Set the reference details.
|
void |
setReferencePatientInMatch(PatientInMatch patient)
Set the reference patient in match when the match was found.
|
void |
setScore(Double score)
Set the match score.
|
void |
setStatus(String status)
Marks status property of match (saved, rejected or uncategorized).
|
org.json.JSONObject |
toJSON() |
void |
updateComments(String comment)
Updates match comments JSON log string property with new comment.
|
void |
updateNotes(String note)
Updates a notes JSON with new note record.
|
void |
updateNotificationHistory(org.json.JSONObject notificationRecord)
Updates a notification history JSON log string property with new notification record.
|
static final org.xwiki.model.reference.EntityReference DATA_SPACE
Long getId()
String getReferencePatientId()
String getReferenceServerId()
String getMatchedPatientId()
String getMatchedServerId()
@Deprecated boolean isRejected()
getStatus() insteadvoid setStatus(String status)
status - whether saved, rejected or uncategorizedvoid setComments(org.json.JSONArray comments)
comments - comments JSON arrayvoid updateComments(String comment)
[ { "userinfo":{"id":"xwiki:XWiki.Mary",
"name":"Mary Green"},
"comment":"This is a good match",
"date":"2018/12/06 15:36"},
...
]
comment - the new comment stringvoid setNotes(org.json.JSONArray notes)
[ {"user":"xwiki:XWiki.Pat",
"note":"This match is very important"}
...
]
notes - notes JSON arrayvoid updateNotes(String note)
note - the new note stringorg.json.JSONObject toJSON()
Double getScore()
Double getPhenotypeScore()
Double getGenotypeScore()
String getHref()
String getStatus()
org.json.JSONArray getComments()
String getNote()
org.json.JSONArray getNotes()
boolean isEquivalent(PatientMatch other)
other is equivalent to this.
A match m1 is equivalent to a match m2 if all the following are true:
m1.referencePatientId = m2.matchedPatientId
m1.referenceServerId = m2.matchedServerId
m2.matchedPatientId = m1.referencePatientId
m2.matchedPatientId = m1.referenceServerIdother - match to compare toboolean hasSameMatchData(PatientMatch other)
isEquivalent()) and that the match data is the same,
meaning that scores are the same, phenotype/genotype is the same, etc. However all difference in
metadata (IDs, timestamps, notificationHistory, notes) is ignored.other - match to compare toPatientInMatch getReference()
PatientInMatch object representing the reference patient.PatientInMatch getMatched()
PatientInMatch object representing the matched patient.boolean isReference(String patientId, String serverId)
patientId - id of patientserverId - id of server where patient is foundboolean isMatched(String patientId, String serverId)
patientId - id of patientserverId - id of server where patient is foundboolean isLocal()
isLocal()==true ==> isIncoming()==false && isOutgoing()==false
and
isLocal()==false ==> only one of (isIncoming(), isOutgoing()) is trueboolean isIncoming()
isLocal().boolean isOutgoing()
isLocal().Timestamp getFoundTimestamp()
void setFoundTimestamp(Timestamp timestamp)
timestamp - timestampvoid setScore(Double score)
score - scorevoid setGenotypeScore(Double score)
score - scorevoid setPhenotypeScore(Double score)
score - scorevoid setReferenceDetails(String details)
details - detailsvoid setReferencePatientInMatch(PatientInMatch patient)
patient - patientvoid setMatchedDetails(String details)
details - detailsvoid setMatchedPatientInMatch(PatientInMatch patient)
patient - patientString getReferenceDetails()
String getMatchedDetails()
org.json.JSONObject getNotificationHistory()
void setNotificationHistory(org.json.JSONObject notificationHistory)
notificationHistory - the notification history JSONvoid updateNotificationHistory(org.json.JSONObject notificationRecord)
{ "from": {"userinfo":{"id":"xwiki:XWiki.Mary",
"name":"Mary"},
"emails" :["mary@blueberry.com"]
},
"to": {"userinfo":{ "id":"xwiki:XWiki.Pat",
"name":"Pat Smith",
"institution":"Western Hospital San Diego"},
"emails":["patcat@catrescuecentre.kom"]
},
"cc": ["mary@blueberry.com"],
"type":"contact",
"date":"2018/12/06 14:58"
}
notificationRecord - the new notification record JSONvoid setExternallyContacted(boolean isExternallyContacted)
isExternallyContacted - boolean indicator whether contact regarding this match was done or notorg.json.JSONArray getFeatureMatchesJSON()
org.json.JSONArray getGenotypeSimilarityJSON()
Copyright © 2011–2019 University of Toronto, Computational Biology Lab. All rights reserved.