FLUTE Cross-border Prostate Cancer Data Standard Guide
0.1.0 - ci-build
Funded by the European Union

FLUTE Cross-border Prostate Cancer Data Standard Guide, published by Flute Project. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/hl7-eu/flute/ and changes regularly. See the Directory of published versions

Library: Prostate Cancer Research Variables

Official URL: http://hl7.eu/fhir/ig/flute/Library/ResearchVariables Version: 0.1.0
Draft as of 2025-04-24 Computable Name: ResearchVariables
Title: Prostate Cancer Research Variables
Id: ResearchVariables
Version: 0.1.0
Url: Prostate Cancer Research Variables
Status: draft
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Subject:

system: http://hl7.org/fhir/resource-types

code: Patient

Date: 2025-04-24 09:01:03+0000
Publisher: Flute Project
Description:

Retrieves key research variables for prostate cancer studies.

Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
ageAtBiopsyResource0*Out
pcaFamilyHistoryinteger01Out
typeOfBiopsyinteger01Out
psaResource0*Out
dreinteger01Out
prostateVolumeResource0*Out
piradsResource0*Out
Data Requirements:
TypeProfileMSCode Filter
Procedure http://hl7.org/fhir/StructureDefinition/Procedure code filter:
path: code

system: http://snomed.info/sct

code: 86273004

display: Biopsy

FamilyMemberHistory http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory
Procedure http://hl7.org/fhir/StructureDefinition/Procedure code filter:
path: code

system: http://snomed.info/sct

code: 86273004

display: Biopsy

Observation http://hl7.org/fhir/StructureDefinition/Observation code filter:
path: code

system: http://loinc.org

code: 2857-1

display: Prostate specific Ag [Mass/volume] in Serum or Plasma

Procedure http://hl7.org/fhir/StructureDefinition/Procedure code filter:
path: code

system: http://snomed.info/sct

code: 410006001

display: Digital examination of rectum

Observation http://hl7.org/fhir/StructureDefinition/Observation code filter:
path: code

system: http://snomed.info/sct

code: 1297142007

display: Volume of prostate

Observation http://hl7.org/fhir/StructureDefinition/Observation code filter:
path: code

system: http://snomed.info/sct

code: 719178004

display: Multiparametric magnetic resonance imaging of prostate

Content: text/cql
library ResearchVariables version '1.0.0'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1' called FHIRHelpers

codesystem "LOINC": 'http://loinc.org' 

codesystem "SNOMED": 'http://snomed.info/sct'

code "psA": '2857-1' from "LOINC" display 'Prostate specific Ag [Mass/volume] in Serum or Plasma'
code "drE": '410006001' from "SNOMED" display 'Digital examination of rectum'
code "susceptible": '131196009' from "SNOMED" display 'susceptible'
code "biopsy": '86273004' from "SNOMED" display 'Biopsy'
code "volumeOfProstate": '1297142007' from "SNOMED" display 'Volume of prostate'
code "mri": '719178004' from "SNOMED" display 'Multiparametric magnetic resonance imaging of prostate'
code "repeated": '27582007' from "SNOMED" display 'Repeated'

valueset "pca": 'http://hl7.eu/fhir/ig/flute/ValueSet/VS-PCa'

context Patient

define "ageAtBiopsy":
    [Procedure: "biopsy"] P where P.status = 'completed'
    return P.performed 

define "pcaFamilyHistory":
    if exists([FamilyMemberHistory] F where F.status = 'completed' and F.condition[0].code in "pca") then 1
    else 0

define "typeOfBiopsy":
    if exists([Procedure: "biopsy"] P where P.status = 'completed' and P.category ~ "repeated") then 2
    else 0

define "psa": 
    [Observation:"psA"] O where O.status = 'final'
    return O.value

define "dre":
    if exists([Procedure: "drE"] P  where P.status = 'completed' and  P.outcome ~ "susceptible") then 1
    else 0

define "prostateVolume":
    [Observation:"volumeOfProstate"] O where O.status = 'final'
    return O.value

define "pirads":
    [Observation:"mri"] O where O.status = 'final'
    return O.value



Content: application/elm+xml
Encoded data (54940 characters)