Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

CAIS Document Framework

No description
by

MedTel Software

on 8 February 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of CAIS Document Framework

CAIS Document Framework
Data Model Classes
public class
DocumentStructureElementDto
extends IdentifiableDto
Data Overview
DocumentStructureElementDto
Oracle Database Table
DocumentStructureDto
DocumentTreeItem
Describe Document in SQL
Describe Document in an Oracle Table
Describe Document in a Data Structure
Place the Data Structure in a Model
Use a 'Temp' data model to implement 'Cancel'
Use Events to let other questions/section know about changes.
public class
DocumentTreeItem
extends AISparkTreeItem
public class
PatientSummaryModel
implements
IModelAnswerMap, ICaisDataModel
CaisApplicationDataModels.instance.patientSummaries.getPatientSummaryModel(caisDocumentParameters.patientDto.id);
var model : PatientSummaryModel =
- Describes a single UI element (question, header, image, etc.). Organized in 'Sections' (i.e. cardio,resp)
- A list of DocumentStructureElementDto's defines a document
- Bridge between Data Model and UI implementation. Organized in a flat list compatible (used as a dataProvider)
with a Flex Data Grid.
- The repository for all documents
- Keyed by DocumentId
- Sub-grouping by PatientId
// buildTheFullDocumentStructureList
// A change has occured to the document structure, rebuild the complete list
public static function buildTheFullDocumentStructureList( caisDocumentParameters : CAISDocumentParameters,
documentType : String,
documentStructureMap : DocumentStructureMap ) : AISparkTreeFlattenedList
-- Title Section
INSERT INTO DOCUMENTSTRUCTURE ( guid, questionType, questionId, lineage, siblingOrder, subSection, mandatory, longDesc, shortDesc, description, docType )
VALUES ('cardiovascularInfoHeader','com.ai.cais.domain.entity.InstructionHeader', null, '/sectionCardiovascular', 0, 0, 0,
'The Cardiovascular section of a complete Structure Patient Nurse Assessment.', 'Cardiovascular Section', 'Please answer ALL of the following questions:', 'docPreOpStructured' );

Data Overview
var model : PatientSummaryModel
// use to handle save and cancel more efficiently
private var _tempAnswerContainer : TempAnswerContainer = new TempAnswerContainer();
// performBindingWithAnswerMap
// main function for calling answer listeners
public function performBindingWithAnswerMap(questionId:String, iBaseQuestionAnswerToCheck:IBaseQuestionAnswer):void
User Interface Overview
Document Views
<!--
- CAISDocumentStandardView
-
- Highest level document viewer shared by all applications.
- DocumentViewerBase implements the low level DBase read and UI build logic.
-
- Pattern: 1) Include this component as a viewer in an application level implementation
- ie. ClinicEmrCAISDocumentStandardView
- 2) Then provide a completed caisDocumentParameters object.
- 3) The document will then render automajically
-->

Document Containers
<!--
- CAISDocumentContainer Implementation Notes:
-
- Container Configuration
-
- hasFocusableChildren - true - allows tab to enter into the document
- useVirtualLayout - false - render the entire document, scrolls better and less complicated
- verticalScrollPolicy - on - Visually consistant to have scrollbar on right side
- horizontalScrollPolicy - design requires min of 1024 width, any size larger is ok. No need for scrollbar
-
- AISparkTree
- Is an s:List. The tree has the ability to hide/show/add children of a parent and calculates child depth
- padding. The idea is a drill down questionnaire is actually a fancy rendered tree control. Non
- drilldown questions (ie Sections) are just a list. The CAISDocumentStandardLayout handles any
- specific non-standard layout issues.
-
- getItemRenderer() - Huge design considerations. Will generate a persistable UI item by documentElementType
- for a given patient document.
-
- Required Framework:
- a) CAISDocumentContainers have a list of BaseContentItemRenderes
- b) BaseContentItemRenderes create and render a BaseDocumentComponentItemUI
- c) Document UI types (containers, headers, questions, sections, summary) use
- a base class to define standard features. ie. BasePtSummarySectionComponent
-
- Wee! DRM.
-->

User Interface Overview
Document Questions

DocumentQuestionContainer

<s:Group>

// The Question
<s:HGroup id="mainTopLevelQuestionHGroup">
<s:Group id="questionNumber">
<s:BaseQuestionAnswer id="aQuestion"/>
</s:HGroup>

// The Summary
<containers:DocumentQuestionSummaryVGroup id="documentQuestionSummaryVGroup" />

// The Sub-Question Drill Down
<listBased:CAISDocumentContainer id="subQuestionContainer" />

</s:Group/>
User Interface Overview
BaseQuestionAnswer

// find the factory
var uiFactory : ClassFactory = DocumentContentRendererMapUtils.getQuestionUIFactory( documentPart );

// build it
generatedQuestionUIComponent = uiFactory.newInstance();
if( generatedQuestionUIComponent == null )
return createErrorLabel();

User Interface Overview
- Every question derives from BaseQuestionAnswer

- Each question type has an entry in the questionUIFactory

- Each question consists of a 'Question' and 'Answer' UI component

- Each question is responsible for rendering and user input of the question answer (ie Y/N/U)
BaseQuestionAnswer - UI States

<!-- UI States -->
<s:states>
<s:State name="questionOnlyState" />
<s:State name="questionAndSummaryState" />
<s:State name="questionAndDrilldownState" />
</s:states>


User Interface Overview
questionOnlyState
- No Summary or drilldown
- No answer, negative answer, unknown answer

questionAndSummaryState
- Show the question and answer
- Show the 'Summary' of drilldown info if it exists

questionAndDrilldownState
- Show the drilldown questions
- Hide the Summary
BaseQuestionAnswer - Summary Phrase Creation

// generateSummaryFromDocumentTreeItem
// Return a string representing the summary of this answered question
public static function generateSummaryFromDocumentTreeItem
( rootItem : DocumentTreeItem, params : CAISDocumentParameters ) : String
User Interface Overview
// buildSummaryString
// Return the summary string for this document tree item, answer, and document parameters
// Supports - constants defined in DocumentStructureElementDto:
//
FORMAT_DEFAULT_FOR_ANSWER_TYPE
// default, use the answer type's default rendering
//
FORMAT_LABEL_THEN_ANSWER
// Short desc, then answer
//
FORMAT_ANSWER_THEN_LABEL
// Answer, then short desc
//
FORMAT_ANSWER_ONLY
// Only the answer
//
FORMAT_LABEL_ONLY
// Only the label
//
FORMAT_EMPTY
// No summary

// Modifiers:
//
FORMAT_DECIMAL_PERCISION:[n]
// ie 0,1,2,3. FORMAT_DECIMAL_PERCISION:2
//
FORMAT_PERT_NEG_PREFIX:[prefix]
// ie 'non', 'no', 'not'. FORMAT_PERT_NEG_PREFIX:non
//
FORMAT_PERT_NEG
// Do we format and return the 'negative' answer

//
i.e. FORMAT_ANSWER_THEN_LABEL|FORMAT_DECIMAL_PERCISION:3
//
FORMAT_ANSWER_ONLY|FORMAT_PERT_NEG|FORMAT_PERT_NEG_PREFIX:no
// no Aortic Stenosis
Answer Types
User Interface Overview
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_TAKE_MEDICATION_IN_24_HOURS_SCALE
]
= new
SummaryAnswer_TakeMedicationIn24HoursScale()
;
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_FACILITY_PHYS_COMBO_BOX
]
= new
SummaryAnswer_FacilityPhysComboBox()
;
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_NURSE_PHYSICIAN_COMMENT
]
= new
SummaryAnswer_NursePhysicianComment()
;
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_DATE_TIME_INPUT
] = new SummaryAnswer_DateTimeInput();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_BLOOD_PRESSURE
] = new SummaryAnswer_BloodPressure();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_YES_NO_UNKNOWN
] = new SummaryAnswer_YesNoUnknown();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_PAIN_CONCEPT
] = new SummaryAnswer_PainConcept();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_LIST_IMAGES
] = new SummaryAnswer_ListImages();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_DATE_INPUT
] = new SummaryAnswer_DateInput();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_YEAR_MONTH
] = new SummaryAnswer_YearMonth();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_TEXT_AREA]
= new SummaryAnswer_TextArea();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_COMBO_BOX
] = new SummaryAnswer_ComboBox();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_LENGTH
] = new SummaryAnswer_Length();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_FLOAT
] = new SummaryAnswer_Float();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_MONTH
] = new SummaryAnswer_Month();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_SCALE
] = new SummaryAnswer_Scale();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_TEXT
] = new SummaryAnswer_Text();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_DATE
] = new SummaryAnswer_Date();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_YEAR
] = new SummaryAnswer_Year();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_MASS
] = new SummaryAnswer_Mass();
summaryAnswerTypeMap[QuestionTypeConstants.
TYPE_ANSWER_LIST
] = new SummaryAnswer_List();
1. For Every Question
a) Implement Renderer
b) Implement updateUIFromData()
c) Implement (at least) Events:
UI_POSITIVE_ANSWER_SELECTED
UI_CLEAR_SELECTION

2. For Every Answer Type
a) Implement Renderer
b) Implement Summary Phrase
- All Summary Types and Modifier conditions
TODO's
Estimated time: 55 Story points
Data:
- The database describes Documents
- Documents contain elements
- Elements have question and answer types

UI:
- Documents are rendered in Document Views
- Document Views contain Document Containers
- Document Containers contain Question and Element Containers
- Question Containers hold:
1) A Question Element
2) A Summary
3) Another Document Container
- Document Elements render to Questions or UI Obects
- A Question
1) Has a label and question renderer
2) Can render and return an answer value
Summary
Full transcript