Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRS preference in File profile #60

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion input/fsh/modules/files.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@ Description: "Provides a list of hashes for confirming file transfers"
* extension contains HashType named hash-type 1..1
* extension[hash-type] ^short = "Algorithm used to calculate the hash (and size, where applicable)"

Invariant: must-be-drs-uri
Description: "attachment.url must start with ^drs://. A drs:// hostname-based URI, as defined in the DRS documentation, that tells clients how to access this object. The intent of this field is to make DRS objects self-contained, and therefore easier for clients to store and pass around. For example, if you arrive at this DRS JSON by resolving a compact identifier-based DRS URI, the `self_uri` presents you with a hostname and properly encoded DRS ID for use in subsequent `access` endpoint calls."
Expression: "$this.url.matches('^drs://.*')"
Severity: #error

Profile: DRSAttachment
Parent: Attachment
Id: ncpi-drs-attachment
Title: "DRS Attachment"
Description: "A FHIR Attachment with a DRS url."
* ^version = "0.1.0"
* ^status = #draft
* obeys must-be-drs-uri

/** TODO Add Related file to metadata - AH 2024-07-30 */

Profile: NcpiFile
Expand Down Expand Up @@ -139,4 +153,20 @@ Description: "Information about a file related to a research participant"
* description ^short = "A description of the file"
* type 0..1 /*File Type*/
* type from edam-ontology-terms (extensible)
* type ^short = "The type of data contained in this file."
* type ^short = "The type of data contained in this file."

Profile: NcpiDRSFile
Parent: NcpiFile
Id: ncpi-drs-file
Title: "NCPI DRS File"
Description: "Information about a DRS file related to a research participant"
* ^version = "0.0.1"
* ^status = #draft
* content ^slicing.discriminator.type = #pattern
* content ^slicing.discriminator.path = "code"
* content ^slicing.rules = #openAtEnd
* content ^slicing.ordered = true
* content ^slicing.description = "Slicing pattern to make content.attachment require a DRS file type and allow other file types"
* content contains
DRS 1..1
* content[DRS].attachment only DRSAttachment
Loading