4 Annotation Pane Configuration

This section describes how to configure the annotation pane using REST APIs. It contains the following sections:

4.1 GET Annotation Pane Configuration

Gets all the annotation pane UI details as JSON.

PATH <server url>/ohpm/opmconfigapi/v1.0/config/annotationPane
ACCEPTS application/json
RETURNS application/json
METHOD GET

Response

Code Reason Representation (Example)
200 success  

Example

{
    "eltWid": 1,
    "type": "PANE",
    "level": 0,
    "displayOrder": 0,
    "label": "Annotation",
    "items": [{
        "eltWid": 2,
        "type": "INPUT",
        "level": 1,
        "displayOrder": 0,
        "label": "Significance",
        "data_type": "ENUM",
        "attr_wid": 57,
        "data_key": "significance",
        "options": {
            "multiple": false,
            "read_only": false,
            "display": true,
            "allow_custom": false
        },
        "values": [{
            "wid": 2,
            "label": "Likely Benign",
            "value": 2,
            "displayOrder": 3
        }, {
            "wid": 1,
            "label": "Unknown Significance",
            "value": 1,
            "displayOrder": 4
        }]
    }, {
        "eltWid": 3,
        "type": "INPUT",
        "level": 1,
        "displayOrder": 1,
        "label": "Associated Diagnosis",
        "data_type": "LOOKUP",
        "attr_wid": 71,
        "data_key": "var_associated_diseases",
        "data_url": "diagnoses",
        "options": {
            "multiple": true,
            "read_only": false,
            "display": true,
            "allow_custom": true
        }
    }]
}

4.2 UPDATE Annotation Pane Configuration

This updates the label, display (True or False) and Display Order on the Annotation pane. The user has to be admin role of pm_admin_group.

Note:

While updating, make sure the display order is correct. This value cannot be duplicated for all siblings.
PATH <server url>/ohpm/opmconfigapi/v1.0/config/annotationPane/changed
ACCEPTS application/json
RETURNS application/json
METHOD PUT

Request

PARAMETER DESCRIPTION PARAMETER TYPE DATA TYPE/ REPRESENTATION
body   body
[{
  "etlWid":Number,
  "label":String,
"display" : String,
"displayOrder" : String
 }]

Example

[{
    "eltWid": 2,
    "label": "Significance",
    "display": true,
    "displayOrder": 0
}, {
    "eltWid": 3,
    "label": "Associated Diagnosis",
    "display": true,
    "displayOrder": 1
}]

Response

Code Reason Representation (Example)
200 success  

4.3 UPDATE Annotation Pane Labels

This lets the user update the Label element on the annotation pane. The user must have the admin role of pm_admin_group.

PATH <server url>/ohpm/opmconfigapi/v1.0/config/panes/annotation/labels
ACCEPTS application/json
RETURNS application/json
METHOD PUT

Request

PARAMETER DESCRIPTION PARAMETER TYPE DATA TYPE/ REPRESENTATION
body   body
{
    "eltType": String, 
    "eltDataKey": String, 
    "label": String 
}]

Example

[{
   "eltType":"SECTION",
   "eltDataKey":"external_information",
   "label":"Externals"
},
{
   "eltType":"INPUT",
   "eltDataKey":"significance",
   "label":"Variant Significance"
}]

Response

Code Reason Representation (Example)
200 success  

4.3.1 Request Body for Different Element Types

The following table shows examples of request body for different element types.

Element Types Body
Group SECTION Label
[{ 
    "eltType":"SECTION", 
    "eltDataKey":"external_information", 
    "label":"Externals" 
 }]
INPUT Label
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"significance", 
    "label":"Variant Significance" 
}]
SECTION Label for COMBO
[{ 
    "eltType":"SECTION", 
    "eltDataKey":"clinvar", 
    "label":"ClinVar Info" 
}]
INPUT Label for COMBO: set it null
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"clinvar", 
    "label":null 
}]
INPUT Label for COMBO: set it value
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"n_of_one", 
    "label":"Send to Interpret" 
 }] 
INPUT Label: set it value
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"drug_response_phenotype", 
    "label":"Drug Response" 
 }]
Error: Wrong eltType
[{ 
    "eltType":"PANE1", 
    "eltDataKey":null, 
    "label":"Annotation Pane" 
 }]
Error: Wrong eltDataKey
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"significance1", 
    "label":"Variant Significance" 
 }]
Error: Element is marked as deleted eltDataKey
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"drug_response_phenotype", 
    "label":"Variant Drug Response Phenotype"
 }]

4.4 UPDATE Annotation Pane Display

This lets the user manipulate the display of SECTION/INPUT elements (hide or show) on the annotation pane. The user must have the admin role of pm_admin_group.

PATH <server url>/ohpm/opmconfigapi/v1.0/config/panes/annotation/display
ACCEPTS application/json
RETURNS application/json
METHOD PUT

Request

PARAMETER DESCRIPTION PARAMETER TYPE DATA TYPE/ REPRESENTATION
body   body
[ { 
    "eltDataKey": String, 
    "position": String, 
    "refPointEltDataKey": String 
} ]
Note: Elements referenced by eltDataKey and refPointEltDataKey must be on the same level on the Annotation Pane layout.

Example

[{
   "eltDataKey":"cell_line",
   "position":"first",
   "refPointEltDataKey":null
},
{
   "eltDataKey":"clinvar",
   "position":"last",
   "refPointEltDataKey":null
},
{
   "eltDataKey":"external_information",
   "position":"after",
   "refPointEltDataKey":"cell_line"
},
{
   "eltDataKey":"significance",
   "position":"before",
   "refPointEltDataKey":"comments"
}]

Response

Code Reason Representation (Example)
200 success  

4.4.1 Request Body for Different Element Types

The following table shows examples of request body for different element types.

Element Types Body
Group SECTION Hide

For group section Show or display=true, an error is generated.

You do not need to show any empty group section. But if you need to show at least one child INPUT or COMBO INPUT (SECTION + INPUT) - this group section is automatically displayed.

[{ 
    "eltType":"SECTION", 
    "eltDataKey":"external_information", 
    "display":"false" 
 }]
SECTION for COMBO Hide/Show
[{ 
    "eltType":"SECTION", 
    "eltDataKey":"clinvar", 
    "display":"false"
 }]
INPUT for COMBO Hide/Show
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"clinvar", 
    "label":"ClinVar Info" 
}]
INPUT Label for COMBO: set it null
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"clinvar", 
    "label":null 
}]
INPUT
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"significance", 
    "display":"false"
 }]
Error: Wrong eltType
{
"errorMessage": "Unsupported action for UI element SECTION was requested",
"httpMessage": "Internal Server Error",
"httpStatusCode": 500,
"appErrorCode": "19-02787-47284",
"errorMessageKey": "MI_CONFIG_ELEMENT_TYPE_UNSUPPORTED_ACTION"
}
[{ 
    "eltType":"SECTION", 
    "eltDataKey": "external_information", 
    "display":"true"
 }]
Error: Wrong eltDataKey
{
"errorMessage": "Querying ui element table produced no results for annotation",
"httpMessage": "Internal Server Error",
"httpStatusCode": 500,
"appErrorCode": "19-02784-95113",
"errorMessageKey": "MI_CONFIG_EMPTY_ANNOTATION_QUERY_RESULT"
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"significance1", 
    "display":"false"
 }]
Error: Element is marked as deleted eltDataKey
{
"errorMessage": "Querying ui element table produced no results for annotation",
"httpMessage": "Internal Server Error",
"httpStatusCode": 500,
"appErrorCode": "19-02783-48347",
"errorMessageKey": "MI_CONFIG_EMPTY_ANNOTATION_QUERY_RESULT"
}
[{ 
    "eltType":"INPUT", 
    "eltDataKey":"drug_response_phenotype", 
    "display":"false"
 }]

4.5 REORDER Annotation Pane Elements

This lets the user reorder SECTION/INPUT elements on the same level of the annotation pane. The user must have the admin role of pm_admin_group.

PATH <server url>/ohpm/opmconfigapi/v1.0/config/panes/annotation/reorder
ACCEPTS application/json
RETURNS application/json
METHOD PUT

Request

PARAMETER DESCRIPTION PARAMETER TYPE DATA TYPE/ REPRESENTATION
body   body
[{ 
    "eltType": String, 
    "eltDataKey": String, 
    "display": String 
 }]

Example

[{
   "eltType":"SECTION",
   "eltDataKey":"external_information",
   "display":"false"
},
{
   "eltType":"SECTION",
   "eltDataKey":"clinvar",
   "display":"false"
}]

Response

Code Reason Representation (Example)
200 success  

4.5.1 Request Body for Different Element Types

The following table shows examples of request body for different element types.

Element Types Body
Move external_information after cell_line on the Annotation Pane:

No change – default order

[{ 
 "eltDataKey":"external_information", 
 "position":"after", 
 "refPointEltDataKey":"cell_line"
}]
Move external_information as first element on the Annotation Pane
[{ 
 "eltDataKey":"external_information", 
 "position":"first", 
 "refPointEltDataKey":null
}]
Move external_information as last element on the Annotation Pane
[{ 
 "eltDataKey":"external_information", 
 "position":"last", 
 "refPointEltDataKey":null
}]
Restore external_information after cell_line on the Annotation Pane
        
[{ 
 "eltDataKey":"external_information", 
 "position":"after", 
 "refPointEltDataKey":"cell_line"
}]
Restore n_of_one after clinvar in the External Information Section
[{ 
 "eltDataKey":" n_of_one", 
 "position":"after", 
 "refPointEltDataKey":"clinvar"
}]