Пример #1
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="total",
                        coltype=Integer(),
                        value=self.total_score(),
                        comment="Total score ({}-{})".format(
                            self.MIN_TOTAL, self.MAX_TOTAL)),
         SummaryElement(name="p",
                        coltype=Integer(),
                        value=self.score_p(),
                        comment="Positive symptom (P) score ({}-{})".format(
                            self.MIN_P, self.MAX_P)),
         SummaryElement(name="n",
                        coltype=Integer(),
                        value=self.score_n(),
                        comment="Negative symptom (N) score ({}-{})".format(
                            self.MIN_N, self.MAX_N)),
         SummaryElement(name="g",
                        coltype=Integer(),
                        value=self.score_g(),
                        comment="General symptom (G) score ({}-{})".format(
                            self.MIN_G, self.MAX_G)),
         SummaryElement(name="composite",
                        coltype=Integer(),
                        value=self.composite(),
                        comment="Composite score (P - N) ({} to {})".format(
                            self.MIN_P_MINUS_N, self.MAX_P_MINUS_N)),
     ]
Пример #2
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="total_score",
             coltype=Integer(),
             value=self.total_score(),
             comment=f"Total score (/ {self.MAX_TOTAL})",
         ),
         SummaryElement(
             name="factor_1_score",
             coltype=Integer(),
             value=self.factor_1_score(),
             comment=f"Factor 1 score (/ {self.FACTOR_1_MAX})",
         ),
         SummaryElement(
             name="factor_2_score",
             coltype=Integer(),
             value=self.factor_2_score(),
             comment=f"Factor 2 score (/ {self.FACTOR_2_MAX})",
         ),
         SummaryElement(
             name="factor_3_score",
             coltype=Integer(),
             value=self.factor_3_score(),
             comment=f"Factor 3 score (/ {self.FACTOR_3_MAX})",
         ),
         SummaryElement(
             name="factor_4_score",
             coltype=Integer(),
             value=self.factor_4_score(),
             comment=f"Factor 4 score (/ {self.FACTOR_4_MAX})",
         ),
     ]
Пример #3
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="das28_crp",
             coltype=Float(),
             value=self.das28_crp(),
             comment="DAS28-CRP",
         ),
         SummaryElement(
             name="activity_state_crp",
             coltype=SummaryCategoryColType,
             value=self.activity_state_crp(req, self.das28_crp()),
             comment="Activity state (CRP)",
         ),
         SummaryElement(
             name="das28_esr",
             coltype=Float(),
             value=self.das28_esr(),
             comment="DAS28-ESR",
         ),
         SummaryElement(
             name="activity_state_esr",
             coltype=SummaryCategoryColType,
             value=self.activity_state_esr(req, self.das28_esr()),
             comment="Activity state (ESR)",
         ),
     ]
Пример #4
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     scoredict = self.get_score()
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="total",
             coltype=Integer(),
             value=scoredict["total"],
             comment="Total (0-n, higher better)",
         ),
         SummaryElement(
             name="n",
             coltype=Integer(),
             value=scoredict["n"],
             comment="Number of applicable questions",
         ),
         SummaryElement(
             name="score",
             coltype=Float(),
             value=scoredict["score"],
             comment="tcore / n",
         ),
         SummaryElement(
             name="logit",
             coltype=Float(),
             value=scoredict["logit"],
             comment="log(score / (1 - score))",
         ),
         SummaryElement(
             name="severity",
             coltype=SummaryCategoryColType,
             value=scoredict["severity"],
             comment="Severity",
         ),
     ]
Пример #5
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="total",
             coltype=Integer(),
             value=self.total_score(),
             comment="Total score (/32)",
         ),
         SummaryElement(
             name="distress",
             coltype=Integer(),
             value=self.distress_score(),
             comment="Distress score (/160)",
         ),
         SummaryElement(
             name="intrusiveness",
             coltype=Integer(),
             value=self.intrusiveness_score(),
             comment="Intrusiveness score (/160)",
         ),
         SummaryElement(
             name="frequency",
             coltype=Integer(),
             value=self.frequency_score(),
             comment="Frequency score (/160)",
         ),
     ]
Пример #6
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     scorer = self.get_score()
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="quality_of_attachment_score",
             coltype=Integer(),
             value=scorer.quality_score,
             comment=f"Quality of attachment score (for complete tasks, "
             f"range "
             f"{self.MIN_QUALITY}-"
             f"{self.MAX_QUALITY})",
         ),
         SummaryElement(
             name="time_in_attachment_mode_score",
             coltype=Integer(),
             value=scorer.time_score,
             comment=f"Time spent in attachment mode (or intensity of "
             f"preoccupation) score (for complete tasks, range "
             f"{self.MIN_TIME}-"
             f"{self.MAX_TIME})",
         ),
         SummaryElement(
             name="global_attachment_score",
             coltype=Integer(),
             value=scorer.global_score,
             comment=f"Global attachment score (for complete tasks, range "
             f"{self.MIN_GLOBAL}-"
             f"{self.MAX_GLOBAL})",
         ),
     ]
Пример #7
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="total_score",
             coltype=Integer(),
             value=self.total_score(),
             comment=f"Total score (/ {self.MAX_TOTAL})",
         ),
         SummaryElement(
             name="avoidance_score",
             coltype=Integer(),
             value=self.avoidance_score(),
             comment=f"Avoidance score (/ {self.MAX_AVOIDANCE})",
         ),
         SummaryElement(
             name="intrusion_score",
             coltype=Integer(),
             value=self.intrusion_score(),
             comment=f"Intrusion score (/ {self.MAX_INTRUSION})",
         ),
         SummaryElement(
             name="hyperarousal_score",
             coltype=Integer(),
             value=self.hyperarousal_score(),
             comment=f"Hyperarousal score (/ {self.MAX_HYPERAROUSAL})",
         ),
     ]
Пример #8
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="total_pain",
             coltype=Float(),
             value=self.total_pain(),
             comment=f"Total pain (/{self.MAX_SCORE_PER_Q})",
         ),
         SummaryElement(
             name="continuous_pain",
             coltype=Float(),
             value=self.continuous_pain(),
             comment=f"Continuous pain (/{self.MAX_SCORE_PER_Q})",
         ),
         SummaryElement(
             name="intermittent_pain",
             coltype=Float(),
             value=self.intermittent_pain(),
             comment=f"Intermittent pain (/{self.MAX_SCORE_PER_Q})",
         ),
         SummaryElement(
             name="neuropathic_pain",
             coltype=Float(),
             value=self.neuropathic_pain(),
             comment=f"Neuropathic pain (/{self.MAX_SCORE_PER_Q})",
         ),
         SummaryElement(
             name="affective_pain",
             coltype=Float(),
             value=self.affective_pain(),
             comment=f"Affective pain (/{self.MAX_SCORE_PER_Q})",
         ),
     ]
Пример #9
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="nelson_full_scale_iq",
             coltype=Float(),
             value=self.nelson_full_scale_iq(),
             comment="Predicted WAIS full-scale IQ (Nelson 1982)"),
         SummaryElement(name="nelson_verbal_iq",
                        coltype=Float(),
                        value=self.nelson_verbal_iq(),
                        comment="Predicted WAIS verbal IQ (Nelson 1982)"),
         SummaryElement(
             name="nelson_performance_iq",
             coltype=Float(),
             value=self.nelson_performance_iq(),
             comment="Predicted WAIS performance IQ (Nelson 1982"),
         SummaryElement(
             name="nelson_willison_full_scale_iq",
             coltype=Float(),
             value=self.nelson_willison_full_scale_iq(),
             comment="Predicted WAIS-R full-scale IQ (Nelson & Willison 1991"
         ),  # noqa
         SummaryElement(
             name="bright_full_scale_iq",
             coltype=Float(),
             value=self.bright_full_scale_iq(),
             comment="Predicted WAIS-IV full-scale IQ (Bright 2016)"),
         SummaryElement(
             name="bright_general_ability",
             coltype=Float(),
             value=self.bright_general_ability(),
             comment="Predicted WAIS-IV General Ability Index (Bright 2016)"
         ),  # noqa
         SummaryElement(
             name="bright_verbal_comprehension",
             coltype=Float(),
             value=self.bright_verbal_comprehension(),
             comment=
             "Predicted WAIS-IV Verbal Comprehension Index (Bright 2016)"
         ),  # noqa
         SummaryElement(
             name="bright_perceptual_reasoning",
             coltype=Float(),
             value=self.bright_perceptual_reasoning(),
             comment=
             "Predicted WAIS-IV Perceptual Reasoning Index (Bright 2016)"
         ),  # noqa
         SummaryElement(
             name="bright_working_memory",
             coltype=Float(),
             value=self.bright_working_memory(),
             comment="Predicted WAIS-IV Working Memory Index (Bright 2016)"
         ),  # noqa
         SummaryElement(
             name="bright_perceptual_speed",
             coltype=Float(),
             value=self.bright_perceptual_speed(),
             comment="Predicted WAIS-IV Perceptual Speed Index (Bright 2016)"
         ),  # noqa
     ]
Пример #10
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="total",
                        coltype=Integer(),
                        value=self.total_score(),
                        comment="Total score (/{})".format(self.MAX_SCORE)),
         SummaryElement(name="positive",
                        coltype=Boolean(),
                        value=self.is_positive(),
                        comment="FAST positive?"),
     ]
Пример #11
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="category",
                        coltype=SummaryCategoryColType,
                        value=self.get_description(req),
                        comment="Diagnostic category"),
         SummaryElement(name="psychotic_symptoms",
                        coltype=Boolean(),
                        value=self.psychosis_present(),
                        comment="Psychotic symptoms present?"),
     ]
Пример #12
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="total",
                        coltype=Integer(),
                        value=self.total_score(),
                        comment="Total score (/{})".format(self.MAX_SCORE)),
         SummaryElement(name="category",
                        coltype=String(50),
                        value=self.category(req),
                        comment="Categorization"),
     ]
Пример #13
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="overall",
             coltype=Float(),
             value=self.score_overall(),
             comment="Overall mean score (0-100, higher better)",
         ),
         SummaryElement(
             name="physical_functioning",
             coltype=Float(),
             value=self.score_physical_functioning(),
             comment="Physical functioning score (0-100, higher better)",
         ),
         SummaryElement(
             name="role_limitations_physical",
             coltype=Float(),
             value=self.score_role_limitations_physical(),
             comment="Role limitations due to physical health score "
             "(0-100, higher better)",
         ),
         SummaryElement(
             name="role_limitations_emotional",
             coltype=Float(),
             value=self.score_role_limitations_emotional(),
             comment="Role limitations due to emotional problems score "
             "(0-100, higher better)",
         ),
         SummaryElement(
             name="energy",
             coltype=Float(),
             value=self.score_energy(),
             comment="Energy/fatigue score (0-100, higher better)",
         ),
         SummaryElement(
             name="emotional_wellbeing",
             coltype=Float(),
             value=self.score_emotional_wellbeing(),
             comment="Emotional well-being score (0-100, higher better)",
         ),
         SummaryElement(
             name="social_functioning",
             coltype=Float(),
             value=self.score_social_functioning(),
             comment="Social functioning score (0-100, higher better)",
         ),
         SummaryElement(
             name="pain",
             coltype=Float(),
             value=self.score_pain(),
             comment="Pain score (0-100, higher better)",
         ),
         SummaryElement(
             name="general_health",
             coltype=Float(),
             value=self.score_general_health(),
             comment="General health score (0-100, higher better)",
         ),
     ]
Пример #14
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="total",
                        coltype=Integer(),
                        value=self.total_score(),
                        comment="Total score (/{})".format(self.MAX_SCORE)),
         SummaryElement(name="severity",
                        coltype=SummaryCategoryColType,
                        value=self.severity(req),
                        comment="Severity"),
     ]
Пример #15
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="total",
                        coltype=Integer(),
                        value=self.total_score(),
                        comment="Total score (/{})".format(
                            self.NQUESTIONS)),
         SummaryElement(name="likelihood",
                        coltype=SummaryCategoryColType,
                        value=self.likelihood(req),
                        comment="Likelihood of problem"),
     ]
Пример #16
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="anxiety",
                        coltype=Integer(),
                        value=self.anxiety_score(),
                        comment="Anxiety score (/{})".format(
                            self.MAX_ANX_SCORE)),
         SummaryElement(name="depression",
                        coltype=Integer(),
                        value=self.depression_score(),
                        comment="Depression score (/21)"),
     ]
Пример #17
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="total_score",
                        coltype=Integer(),
                        value=self.total_score(),
                        comment="Total score (/ {})".format(
                            self.MAX_TOTAL)),
         SummaryElement(name="composite_score",
                        coltype=Float(),
                        value=self.composite_score(),
                        comment="Composite score (/ {})".format(
                            self.MAX_COMPOSITE)),
     ]
Пример #18
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="total",
                        coltype=Integer(),
                        value=self.total_score(),
                        comment="Total score (/{})".format(self.MAX_SCORE)),
         SummaryElement(
             name="exceeds_threshold",
             coltype=Boolean(),
             value=self.exceeds_ross_threshold(),
             comment="Exceeds Ross threshold (total score >= {})".format(
                 self.ROSS_THRESHOLD)),
     ]
Пример #19
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="tto_qol",
             coltype=Float(),
             value=self.get_tto_qol(),
             comment="Quality of life (0-1), from time trade-off method"),
         SummaryElement(
             name="rs_qol",
             coltype=Float(),
             value=self.get_rs_qol(),
             comment="Quality of life (0-1), from rating scale method"),
     ]
Пример #20
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="health_state",
             coltype=String(length=5),
             value=self.get_health_state_code(),
             comment="Health state as a 5-character string of numbers, "
             "with 9 indicating a missing value"),
         SummaryElement(name="visual_task_score",
                        coltype=Integer(),
                        value=self.get_vis_score_or_999(),
                        comment="Visual analogue health score "
                        "(0-100, with 999 replacing None)")
     ]
Пример #21
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     d = self.get_score_dict()
     s = self.standard_task_summary_fields()
     for item in d:
         s.extend([
             SummaryElement(name=item + "_n",
                            coltype=Integer(),
                            value=d[item][0],
                            comment=item + " (numerator)"),
             SummaryElement(name=item + "_d",
                            coltype=Integer(),
                            value=d[item][1],
                            comment=item + " (denominator)"),
         ])
     return s
Пример #22
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="total",
             coltype=Integer(),
             value=self.total_score(),
             comment=f"Total score (/{self.MAX_SCORE})",
         ),
         SummaryElement(
             name="category",
             coltype=SummaryCategoryColType,
             value=self.category(req),
             comment="Category",
         ),
     ]
Пример #23
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="n_endorsed", coltype=Integer(),
             value=self.n_endorsed(),
             comment="Number endorsed (/ {})".format(self.NQUESTIONS)),
         SummaryElement(
             name="severity_score", coltype=Integer(),
             value=self.severity_score(),
             comment="Severity score (/ {})".format(self.MAX_SEVERITY)),
         SummaryElement(
             name="distress_score", coltype=Integer(),
             value=self.distress_score(),
             comment="Distress score (/ {})".format(self.MAX_DISTRESS)),
     ]
Пример #24
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     results = self.all_choice_results()
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="k_kirby",
             coltype=Float(),
             value=self.k_kirby(results),
             comment="k (days^-1, Kirby 2000 method)",
         ),
         SummaryElement(
             name="k_wileyto",
             coltype=Float(),
             value=self.k_wileyto(results),
             comment="k (days^-1, Wileyto 2004 method)",
         ),
     ]
Пример #25
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="bmi",
                        coltype=Float(),
                        value=self.bmi(),
                        comment="BMI (kg/m^2)"),
     ]
Пример #26
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="depression_risk",
                        coltype=Boolean(),
                        value=self.has_depression_risk(),
                        comment="Has depression or at risk of depression"),
     ]
Пример #27
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     scoredict = self.get_score()
     return self.standard_task_summary_fields() + [
         SummaryElement(
             name="total",
             coltype=Float(),
             value=scoredict['total'],
             comment="Total (out of {}, higher better)".format(
                 self.MAX_TOTAL)),
         SummaryElement(
             name="wm",
             coltype=Integer(),
             value=scoredict['wm'],
             comment="Working memory index (out of {}; "
                     "sum of Q4 + Q6".format(self.MAX_WM)),
     ]
Пример #28
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="total_score",
                        coltype=Integer(),
                        value=self.total_score(),
                        comment="Total score (/ 48)"),
     ]
Пример #29
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     return self.standard_task_summary_fields() + [
         SummaryElement(name="meets_criteria",
                        coltype=Boolean(),
                        value=self.meets_criteria(),
                        comment="Meets criteria for schizotypal disorder?"),
     ]
Пример #30
0
 def get_summaries(self, req: CamcopsRequest) -> List[SummaryElement]:
     elements = self.standard_task_summary_fields()
     for info in self.GROUPS:
         subscore = info.subscore(self)
         elements.append(
             SummaryElement(name=info.summary_fieldname,
                            coltype=Float(),
                            value=subscore,
                            comment="{} (out of {})".format(
                                info.summary_description, info.max_score)))
     elements.append(
         SummaryElement(name="total_score",
                        coltype=Float(),
                        value=self.total_score(),
                        comment="Total score (out of {})".format(
                            self.MAX_SCORE_TOTAL)))
     return elements