Hanging Protocol Data Model Design

Window Manager Requirements

- Must be able to operate with or without a hanging protocol set

- Protocols must be able to have multiple stages (presentation groups)

- Must be able to search for studies based on the current protocol

- Must be able to support multiple criteria

- Search criteria can be loosely defined (e.g. Study description contains XX)

- Must be able to load any study and series required in any viewport

- Must be able to set viewport-specific and stage-specific options (e.g. tools enabled/activated)

- Must be able to reload current data when tabs are reloaded (or on hot-code reload)

- Must be able to switch to a specific setup temporarily and then return to previous setup (e.g. double-click to enlarge viewport)


Advanced

- Layout viewports can be unique sizes, rather than identical sizes




 

LT-146

Design persistence model for created or imported protocols

Are Protocols stored by user?

Shared between users?

Owned by specific users?

LT-144

Create an adapter to export to standard DICOM HP format

This would be primarily for interoperability / data exchange.

LT-143

Create an adapter for the ClearCanvas HP

NOTE: this adapter's code should be documented "to the 9's"

LT-142

Shall have a way to specify primary vs. prior study relationships

In other words, the user should have control over which (and how many) priors to view, and where they are shown.

LT-141

Shall save various display parameters in the HP

Such as:

* W/L (and/or W/L preset)

* Image orientation (flip, rotate)

* Invert

* Zoom level / pan (maybe by percentages??)

* LUT

* CAD markers (on/off)

* Cornerstone viewport settings

LT-140

Shall make a "recording mode" to edit the protocol via user actions in the viewer

For example: while in recording mode, changing the layout in the viewer would alter the HP's layout, and would pre-populate rules with the actual values from the displayed DICOM series.

LT-139

Must create an "extra" presentation group to catch any missed series

Shall record which series have been viewed so that a presentation group can be created to display any series that the protocol did NOT display (avoid missing reviewing images)

LT-138

Must support presentation group ordering

This represents a sequence of layouts that are to be stepped through in order.

LT-137

Must support a "required" property on rules

It means if that rule doesn't match, then don't apply this HP.

LT-136

Must support multiple rules and a way to order their priority

Can use sequence, weights, or some other way to describe priority.

LT-135

Must support using DICOM tags and comparitors to express rules

DICOM tags may be limited by their scope (i.e. some tags are not appropriate for certain levels in the rules).

Comparitor examples: Contains, doesnotcontain, equals, notequals, etc.

LT-134

Must support rules for selecting which Study / Series / Image to use for each image box

 

LT-133

Must support description of image box layout

Future: layout manager should support more complex layouts than just X x Y

LT-132

Must support rules for auto-selecting most relevant HP to apply when loading a study (engine + application)

 

LT-131

Design and document our HP data model

 

 

Pieces

ProtocolEngine

  • Applicability:
    • Identifies matching protocols given a study / list of studies
    • Creates object which Matching rules are tested against, given studies
    • Checks 
      • Which protocols are available to the User
      • Which protocols require the study modality
      • Which protocols match all required Matching Rules
    • Applies first by priority in descending order
    • Returns all matched criteria to WindowManager so the user can switch protocols
  • Study selection rules based on applicable protocol
    • Log decisions regarding matching

WindowManager

  • Displays Series in Viewports given a Protocol and list of Studies
    • Log decisions regarding matching
  • Automatically creates extra display group to show unseen series (LT-139)
  • Should allow users to go forward / back through protocol stages
  • Should allow users to exit protocol for free viewing
  • Should display current protocol and stage to user
  • Should allow users to switch protocols
  • API:
    • setHangingProtocol (id)
    • getHangingProtocol
    • exitHangingProtocol
    • setProtocolStage(int)
    • getProtocolStage

 

ProtocolRecorder (LT-140)

  • Writes / Edits protocol rules based on current display
  • Ownership / Persistence: Users have list of Protocols available to / editable by them based on their Role(s) (LT-146)
  • Can clone an available Protocol to create a user-specific version (LT-146)
  • Allow rules to be edited individually by viewport
  • Can import / export ClearCanvas and DICOM HP files (LT-143, LT-144)
  • Imported protocols are added to MongoDB
  • Protocols are saved as MongoDB documents
  • Protocols can be exported as JSON files
  • Pages / Sections
    • Select Protocol
      • Displays available Protocols
      • Create new Protocol
      • Clone to new Protocol
      • Import from HP files (JSON, DICOM-HP, ClearCanvas)
    • Edit Protocol
      • Editable Rules based on current protocol / stage
      • Save to Database
      • Change availability / editability Roles 
      • Export
    • Export Protocol
      • JSON
      • DICOM HP (with disclaimer about missing features)

 

HP data model:

Protocol = {

 id :

 Name:

createdBy User

createdDate

modifiedDate

availableTo: [Roles]

editableBy: [Roles]

priority: Value out of 100 by which protocols are applied

modalitiesRequired: ['MG', 'DX', etc..]  //For simpler protocol matching

 

[ProtocolMatchingRules] (sorted by priority, LT-136)

StudyRequirements: {

 // Not yet specified..

}
 [Stages]

}

 

(LT-132) ProtocolMatchingRule = {

 required: Boolean

  weight: (default 1)

 Criteria: {

 ValidateJS logic for selecting protocols given a study or set of studies, e.g.:

 

modality: {

  inclusion: {

      within: {

          MG: ‘MG’,

      },

  }

},

}

}

 

(LT-138) Stage = {

 ViewportStructure

 [Viewports]

}

 

// Viewport structure can be updated later when we build more complex display layouts

 

(LT-133) ViewportStructure = {

 Type: “grid”

 rows: 2

 columns : 1

}

 

(LT-134) Viewport = {

 [ImageMatchingRules]

rendererType: cornerstone / Slicer?

 (LT-141) viewportSettings: {

  Cornerstone / Slicer viewport settings are here

 },

(LT-141) toolSettings: {

  Tool settings would go here (e.g. CAD markers: enabled)

 }

}

 

ImageMatchingRule = {

 required: Boolean

  weight: (default 1)

 Criteria: {

 ValidateJS logic for selecting images, e.g.:

 Criteria names can be DICOM tags (LT-135)

e.g. sameAsPrimary

 

 seriesDescription: {

  inclusion: {

      within: {

          RMLO: 'RMLO’,

      },

  }

},

 },

}