We're updating the issue view to help you get more done. 

Modify the JSON serialization of consent objects to include the actual fields affected by the consent, if any

Description

Currently, making a request to the "receivePatientData" service with action "get_server_info" returns a JSON including the list of consents configured on the remote server, each consent object containing the list of UIX extensions not shown in the form if that consent is affecting any fields. Example:

1 2 3 4 5 6 7 { "isRequired": false, "id": "genetic", "label": "I confirm that consent has been obtained to share this patient's genetic sequencing data (e.g., a VCF file) on restricted access databases.", "formFields": ["org.phenotips.patientSheet.field.vcf", "org.phenotips.patientSheet.field.variantdisplay"], "status": "not_set" }

This list of UIX extensions is useless on the local server, because sections and fields may be configured differently. Instead (or in addition, for backwards compatibility), the remote server should send the actual list of fields form the fields parameter of each affected UIX, which has become mandatory in 1.3.

Suggested JSON format for consents:

1 2 3 4 5 6 7 8 { "isRequired": false, "id": "genetic", "label": "I confirm that consent has been obtained to share this patient's genetic sequencing data (e.g., a VCF file) on restricted access databases.", "formFields": ["org.phenotips.patientSheet.field.vcf", "org.phenotips.patientSheet.field.variantdisplay"], "dataFields" : ["VCF", "genes"], "status": "not_set" }

(added: dataFields, an array with all the values present in the fields parameter of the UI extensions listed in formFields).

Change in:

(See also the Push API documentation for more information about the Push protocol)

Environment

Status

Assignee

Veronika Koltunova

Reporter

Marta Girdea