Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var REDCapRiskServiceConfig = plugin.RiskServicePluginConfig{ Name: "Multi-Factor Risk Service", Method: models.CodeableConcept{ Coding: []models.Coding{{System: "http://interventionengine.org/risk-assessments", Code: "MultiFactor"}}, Text: "Multi-Factor", }, PredictedOutcome: models.CodeableConcept{Text: "Catastrophic Health Event"}, DefaultPieSlices: []plugin.Slice{ {Name: "Clinical Risk", Weight: 25, MaxValue: 4}, {Name: "Functional and Environmental Risk", Weight: 25, MaxValue: 4}, {Name: "Psychosocial and Mental Health Risk", Weight: 25, MaxValue: 4}, {Name: "Utilization Risk", Weight: 25, MaxValue: 4}, }, RequiredResourceTypes: []string{}, }
Functions ¶
func GetREDCapData ¶
GetREDCapData queries REDCap at the specified endpoint with the specifed token, returning a StudyMap containing the resulting data.
func LogResultSummary ¶
func LogResultSummary(results []Result)
LogResultSummary prints out a log of the result summary (# patients, # errors, # assessments)
Types ¶
type Result ¶
Result represents the result (successful or not) of posting REDCap risk assessments to a FHIR server
func PostRiskAssessments ¶
func PostRiskAssessments(fhirEndpoint string, studies models.StudyMap, pieCollection *mgo.Collection, basisPieURL string) []Result
PostRiskAssessments posts the risk assessments from the studies to the FHIR server and also stores the risk pies to the local Mongo database
func RefreshRiskAssessments ¶
func RefreshRiskAssessments(fhirEndpoint string, redcapEndpoint string, redcapToken string, pieCollection *mgo.Collection, basisPieURL string) ([]Result, error)
RefreshRiskAssessments pulls the risk assessment data from REDCap and posts it to the FHIR server, replacing older risk assessments and storing pie representations.
func (*Result) MarshalJSON ¶
MarshalJSON handles the marshalling of the errors since Go doesn't