Comments (6)
Data Model
data model is designed based on SDC XML structure listed at: https://www.ihe.net/uploadedFiles/Documents/QRPH/IHE_QRPH_Suppl_SDC_Rev3-0_TI_2019-07-26.pdf
Notations:
- @ map to the attribute used in the XML
- . map to the child used in the XML
- ? optional field
- : type
Design:
Procedure
- uid: string // database
- id: string
- assignedFormID: string // UID of the form
Patient
- uid: string // database
- id: string
- name: string
abstract SDCItem
- title?: string @title
- uid: uuid|string // unique identifier in the DB, do not pass to Front
- id: string @id // ID for the questions are on the wrapper
- order?: int @order
- children: [SDCItem] .ChildItems
SDCForm: SDCItem
- title?:string @formTitle
- id //ID ~ lineage + Version
- lineage:string @Lineage //identifier of a form
- version:string @Version //version of a form
- header?:string .Header //xml as string
- footer?:string .Footer //xml as string
- children: [SDCItem] .Body.ChildItems
- formProperties: [SDCFormProperty] .Property
SDCFormProperty
- order?: int @order
- name: string @name
- propName: string @propName // this will be used as the primary identifier
- val = “” @Val
SDCSection: SDCItem
abstract SDCQuestion: SDCItem
- // a question can either be a list or a text but not both
SDCDisplayItem: SDCItem
SDCListField: SDCQuestion
- minSelections = 1:int @minSelections
- maxSelections = 1:int @maxSelections
- options: [SDCListFieldItem] .List
- lookupEndPoint?: string .LookupEndPoint // this said to be mandatory, but not used in the sample xml
SDCListFieldItem: SDCItem
- textResponse?: SDCTextField .ListItemResponseField
- selectionDeselectsSiblings = false @selectionDeselectsSiblings
- // it is possible to have a list mixed of the above
- selectionDisablesChildren = false @selectionDisablesChildren
SDCTextField: SDCQuestion
- textAfterResponse?: string .TextAfterResponse
- type: string // in XML, this is specified via the tag of the child, all valid values are in A.1.6-1
SDCAnswer
- questionID // ID of the question
- uid // database
- responses : [string] // For SDCListField question, this will store the ID of the SDCListFieldItem
SDCFormResponse
- formId // UID of the form, UID is used for tracking the form version as well
- uid
- patientID: string // uid of the patient
- responses: [SDCAnswer]
from proj-dateam.
UML: https://lucid.app/lucidchart/invitations/accept/45d9c009-8d77-44d3-881c-ec095ea82b98
Waiting for final confirmation
from proj-dateam.
Domain model finalized for P1. Description within this thread, UML, and typescript code are all updated.
from proj-dateam.
@umar-ahmed Please review the UML and insert to the doc.
from proj-dateam.
@umar-ahmed Please review the UML and insert to the doc.
Will do, thank you
from proj-dateam.
Issue reopened due to domain object update
maxSelections
and minSelections
were on SDCNode
, as those properties can appear on any object in the SDC XML as a way to set the default value for all list field question within a section, Since those fields can be determined for each question when parsing the XML, and no other SDC objects needs those fields, those fields are removed from the SDCNode, and added to SDCListField
Description within this thread, UML, and typescript code are all updated.
@umar-ahmed
from proj-dateam.
Related Issues (20)
- Create a new patient prior to creation of a response on frontend HOT 1
- Add timestamps (updatedAt, createdAt) for form and response models
- Create a new page called Patients that lists out all the patients in our system and allows you to create a new one
- Implement SDCSection Parser HOT 1
- Implement SDCDisplayItem Parser HOT 1
- Add CI workflow to run tests on shared module
- Update all create APIs to return UID
- Call FormResponse validation on post responses at backend
- Add new endpoints to OpenAPI spec
- Enable and fix/update API unit tests HOT 1
- Create a new page for viewing a read-only version of a form response
- Move responses routes to `/responses/manage/...`
- Add patient selection combobox to top of form response
- Add dropdown menu to form response header
- Implement "Copy to clipboard" functionality for read-only form response URL
- Implement `PUT /responses/<id>` to allow replacing existing response
- Implemented `DELETE /responses/<id>` endpoint to allow deletion of form responses
- Create a new page called Procedures that lists out all the procedures in our system and allows you to create new ones
- Add search API
- Complete TextFieldTypeMeta
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proj-dateam.