19.1.48. camcops_server.cc_modules.cc_tracker


Copyright (C) 2012-2018 Rudolf Cardinal (rudolf@pobox.com).

This file is part of CamCOPS.

CamCOPS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

CamCOPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with CamCOPS. If not, see <http://www.gnu.org/licenses/>.


class camcops_server.cc_modules.cc_tracker.ClinicalTextView(req: camcops_server.cc_modules.cc_request.CamcopsRequest, taskfilter: camcops_server.cc_modules.cc_taskfilter.TaskFilter)[source]

Class representing a clinical text view.

get_xml(indent_spaces: int = 4, eol: str = '\n', include_comments: bool = False) → str[source]

Get XML document representing CTV.

class camcops_server.cc_modules.cc_tracker.ConsistencyInfo(tasklist: List[camcops_server.cc_modules.cc_task.Task])[source]

Stores ID consistency information about a set of tasks.

are_all_consistent() → bool[source]

Is all the ID information consistent?

get_description_list() → List[str][source]

Textual representation of ID information, indicating consistency or lack of it.

get_xml_root() → camcops_server.cc_modules.cc_xml.XmlElement[source]

XML tree (as root XmlElementTuple) of consistency information.

class camcops_server.cc_modules.cc_tracker.Tracker(req: camcops_server.cc_modules.cc_request.CamcopsRequest, taskfilter: camcops_server.cc_modules.cc_taskfilter.TaskFilter)[source]

Class representing numerical tracker.

get_all_plots_for_one_task_html(tasks: List[camcops_server.cc_modules.cc_task.Task]) → str[source]

HTML for all plots for a given task type.

get_single_plot_html(datetimes: List[pendulum.datetime.DateTime], values: List[float], specimen_tracker: camcops_server.cc_modules.cc_trackerhelpers.TrackerInfo) → str[source]

HTML for a single figure.

get_xml(indent_spaces: int = 4, eol: str = '\n', include_comments: bool = False) → str[source]

Get XML document representing tracker.

class camcops_server.cc_modules.cc_tracker.TrackerCtvCommon(req: camcops_server.cc_modules.cc_request.CamcopsRequest, taskfilter: camcops_server.cc_modules.cc_taskfilter.TaskFilter, as_ctv: bool)[source]

Base class for Tracker and ClinicalTextView.

get_html() → str[source]

Get HTML representing tracker.

get_pdf() → bytes[source]

Get PDF representing tracker/CTV.

suggested_pdf_filename() → str[source]

Get suggested filename for tracker/CTV PDF.

class camcops_server.cc_modules.cc_tracker.TrackerCtvTests(methodName='runTest')[source]
camcops_server.cc_modules.cc_tracker.consistency(values: List[Any], servervalue: Any = None, case_sensitive: bool = True) → Tuple[bool, str][source]

Checks for consistency in a set of values (e.g. ID numbers, names).

The list of values (with the servervalue appended, if not None) is checked to ensure that it contains only one unique value (ignoring None values or empty “” values).

Returns tuple: (consistent, msg)
consistent: Boolean msg: HTML message
camcops_server.cc_modules.cc_tracker.format_daterange(start: Union[pendulum.datetime.DateTime, NoneType], end: Union[pendulum.datetime.DateTime, NoneType]) → str[source]

Textual representation of inclusive date range.

Arguments are datetime values.