@Component(roles=PhenotipsFamilyMigrations.class) @Singleton public class PhenotipsFamilyMigrations extends Object
| Constructor and Description |
|---|
PhenotipsFamilyMigrations() |
| Modifier and Type | Method and Description |
|---|---|
com.xpn.xwiki.doc.XWikiDocument |
createFamilyDocument(com.xpn.xwiki.doc.XWikiDocument patientXDoc,
org.json.JSONObject pedigreeData,
String pedigreeImage,
com.xpn.xwiki.XWikiContext xcontext,
org.hibernate.Session hsession)
Creates a new family document for given patient with pedigree data.
|
String |
getOwner(com.xpn.xwiki.doc.XWikiDocument patientDoc)
Returns the owner of the patient.
|
org.json.JSONObject |
processPedigree(org.json.JSONObject pedigree,
String patientId)
Adds to the pedigree JSON: "phenotipsId": patient ID in XWiki; "probandNodeID": 0; "JSON_version": "1.0".
|
boolean |
setFamilyReference(com.xpn.xwiki.doc.XWikiDocument patientDoc,
String documentReference,
com.xpn.xwiki.XWikiContext xcontext)
Sets the reference to the family document in the patient document.
|
Set<String> |
updatePedigree(org.json.JSONObject pedigree,
Map<String,String> externalIdToPhenotipsId,
Map<String,String> commentsByPhenotipsId)
Asigns nodes to PhenoTips records and adds comments to nodes.
|
public com.xpn.xwiki.doc.XWikiDocument createFamilyDocument(com.xpn.xwiki.doc.XWikiDocument patientXDoc,
org.json.JSONObject pedigreeData,
String pedigreeImage,
com.xpn.xwiki.XWikiContext xcontext,
org.hibernate.Session hsession)
patientXDoc - patient documentpedigreeData - pedigree data JSONpedigreeImage - pedigree SVG image textxcontext - xwiki contexthsession - hibernate sessionpublic boolean setFamilyReference(com.xpn.xwiki.doc.XWikiDocument patientDoc,
String documentReference,
com.xpn.xwiki.XWikiContext xcontext)
patientDoc - patient documentdocumentReference - family document referencexcontext - contextpublic org.json.JSONObject processPedigree(org.json.JSONObject pedigree,
String patientId)
pedigree - pedigree JSON, supposedly in 1.2.x formatpatientId - patient Idpublic Set<String> updatePedigree(org.json.JSONObject pedigree, Map<String,String> externalIdToPhenotipsId, Map<String,String> commentsByPhenotipsId)
pedigree - pedigree as JSON. The pedigree will be modified in placeexternalIdToPhenotipsId - a map of externalIDs which, if found in pedigree, should be linked
to the corresponding phenotips recordscommentsByPhenotipsId - a map of phenotips ids to comments that shouldbe added for those nodes.
The list may include nodes linked based on the `externalIdToPhenotipsId` listpublic String getOwner(com.xpn.xwiki.doc.XWikiDocument patientDoc)
patientDoc - patient XDocumentCopyright © 2011–2018 University of Toronto, Computational Biology Lab. All rights reserved.