Skip to content

Add linkability to design documents to implement JSON Hypertext Application Language (HAL) #98

Description

@azimov

Strategus design documents are currently isolated resources but there are a number of limitations with this approach in terms of meta-data linkability.

For example:

If I have a study design document I want to link to the protocol for the study and any phenotype algorithms used in the study. And If I'm searching for studies I want to be able to find them based on drug/disease areas of interest, or to relate interests and other investigators may wish to be aware of studies executed in related areas which can be greatly aided through linkability.

My proposal is that we adopt JSON HAL

This approach has two classes for consideration:

  • Resources - proper json documents
  • Links - references to other json documents

Any resource can also, optionally, include a link.

Link Resource Caching

The embedded object is important in our context because any link can be embedded in the document. This means we could support both the definitions:

cohortDefinitions:{
   "_links": {
       cohort1: {href:"https://phenotype_library.com/phenotype_id"},
       cohort2: {href:"https://phenotype_library.com/phenotype_id"}
   }
}

AND

cohortDefinitions:{
   "_links": {
       cohort1: {href:"https://phenotype_library.com/phenotype_id"},
       cohort2: {href:"https://phenotype_library.com/phenotype_id"}
   },

  "_embedded" : {
      ... < cohort definitions>
    }
}

This is referred to as the "hypertext cache pattern" and would allow us to share payloads that include all external resources (which is strongly desired for passing studies around) but could start to create maintainability and auditability headaches.

Security note

The HAL design should never include executable content, this would include the embedded JSON that we currently use for cohort definitions. Though this is low risk it would, potentially, be exploitable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions