Skip to content

Commit

Permalink
Merge branch 'master' into s3-task-chains
Browse files Browse the repository at this point in the history
  • Loading branch information
martinburchell committed Mar 20, 2023
2 parents 1ce57a9 + 6b2ee89 commit e9eb03b
Show file tree
Hide file tree
Showing 33 changed files with 379 additions and 178 deletions.
9 changes: 7 additions & 2 deletions docs/recreate_inclusion_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,13 @@ def main():
)
log.warning("Skipping camcops_windows_service_help.txt (requires Windows)")

secret_regex = r"^(SESSION_COOKIE_SECRET = camcops_autogenerated_secret_)[\w-]+==" # noqa: E501
secret_replacement = r"\g<1>YhXZQ4zVMYobWawci-zbv6nn6B6iMrZcUkGjpko4pExjwNgOpgjGh0TVzUEMt1u3DlzRGI6RJVxd8ohvKGleag==" # noqa: E501
secret_regex = (
r"^(SESSION_COOKIE_SECRET = camcops_autogenerated_secret_)[\w-]+=="
)
secret_replacement = (
r"\g<1>YhXZQ4zVMYobWawci-zbv6nn6B6iMrZcUkGjpko4pEx"
r"jwNgOpgjGh0TVzUEMt1u3DlzRGI6RJVxd8ohvKGleag=="
)

run_cmd(
["camcops_server", "demo_camcops_config"],
Expand Down
18 changes: 16 additions & 2 deletions docs/source/administrator/_camcops_server_allhelp.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
USAGE: camcops_server [-h] [--allhelp] [--version] [-v] [--no_log]
{docs,demo_camcops_config,demo_supervisor_config,demo_apache_config,upgrade_db,dev_upgrade_db,dev_downgrade_db,dev_add_dummy_data,show_db_title,show_db_schema,merge_db,create_db,ddl,reindex,check_index,make_superuser,reset_password,enable_user,export,show_export_queue,crate_dd,cris_dd,serve_cherrypy,serve_gunicorn,serve_pyramid,convert_athena_icd_snomed_to_xml,launch_workers,launch_scheduler,launch_monitor,housekeeping,purge_jobs,dev_cli}
{docs,demo_camcops_config,demo_supervisor_config,demo_apache_config,upgrade_db,dev_upgrade_db,dev_downgrade_db,dev_add_dummy_data,show_db_title,show_db_schema,merge_db,create_db,ddl,reindex,check_index,make_superuser,reset_password,enable_user,export,show_export_queue,crate_dd,cris_dd,serve_cherrypy,serve_gunicorn,serve_pyramid,convert_athena_icd_snomed_to_xml,launch_workers,launch_scheduler,launch_monitor,housekeeping,purge_jobs,dev_cli,list_tasks}
...

CamCOPS server, created by Rudolf Cardinal; version 2.4.15.
Expand All @@ -15,7 +15,7 @@ OPTIONAL ARGUMENTS:
COMMANDS:
Valid CamCOPS commands are as follows.

{docs,demo_camcops_config,demo_supervisor_config,demo_apache_config,upgrade_db,dev_upgrade_db,dev_downgrade_db,dev_add_dummy_data,show_db_title,show_db_schema,merge_db,create_db,ddl,reindex,check_index,make_superuser,reset_password,enable_user,export,show_export_queue,crate_dd,cris_dd,serve_cherrypy,serve_gunicorn,serve_pyramid,convert_athena_icd_snomed_to_xml,launch_workers,launch_scheduler,launch_monitor,housekeeping,purge_jobs,dev_cli}
{docs,demo_camcops_config,demo_supervisor_config,demo_apache_config,upgrade_db,dev_upgrade_db,dev_downgrade_db,dev_add_dummy_data,show_db_title,show_db_schema,merge_db,create_db,ddl,reindex,check_index,make_superuser,reset_password,enable_user,export,show_export_queue,crate_dd,cris_dd,serve_cherrypy,serve_gunicorn,serve_pyramid,convert_athena_icd_snomed_to_xml,launch_workers,launch_scheduler,launch_monitor,housekeeping,purge_jobs,dev_cli,list_tasks}
Specify one command.
docs Launch the main documentation (CamCOPS manual)
demo_camcops_config
Expand Down Expand Up @@ -66,6 +66,7 @@ COMMANDS:
jobs
dev_cli Developer command-line interface, with config loaded
as 'config'.
list_tasks List supported tasks.

===============================================================================
Help for command 'docs'
Expand Down Expand Up @@ -652,3 +653,16 @@ OPTIONAL ARGUMENTS:
--config CONFIG Configuration file (if not specified, the environment
variable CAMCOPS_CONFIG_FILE is checked) (default: None)

===============================================================================
Help for command 'list_tasks'
===============================================================================
USAGE: camcops_server list_tasks [-h] [-v] [--config CONFIG]

List supported tasks.

OPTIONAL ARGUMENTS:
-h, --help show this help message and exit
-v, --verbose Be verbose (default: False)
--config CONFIG Configuration file (if not specified, the environment
variable CAMCOPS_CONFIG_FILE is checked) (default: None)

20 changes: 16 additions & 4 deletions docs/source/administrator/server_config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1644,10 +1644,14 @@ TRANSMISSION_METHOD

One of the following methods:

- ``db``: Exports tasks to a relational database.
- ``email``: Sends tasks via e-mail.
- ``hl7``: Sends HL7 (v2) messages across a TCP/IP network.
- ``file``: Writes files to a local filesystem.
- ``db``: Exports tasks to a relational database; see
:ref:`database exports <config_db>`.
- ``email``: Sends tasks via e-mail; see :ref:`e-mail exports <config_email>`.
- ``fhir``: Sends data via FHIR_; see :ref:`FHIR exports <config_fhir>`.
- ``file``: Writes files to a local filesystem; see
:ref:`file exports <config_file>`.
- ``hl7``: Sends HL7 (v2) messages across a TCP/IP network; see
:ref:`HL7 exports <config_hl7>`.
- ``redcap``: :ref:`Exports tasks to REDCap <redcap>`.


Expand Down Expand Up @@ -1842,6 +1846,8 @@ PRIMARY_IDNUM_ is set.
that the primary ID number must be present (as above) for *all* groups.


.. _config_db:

Options applicable to database export only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -1902,6 +1908,8 @@ a task, or similar) add the fields ``_task_tablename`` and ``_task_pk`` as
part of this denormalization-for-convenience.


.. _config_email:

Options applicable to e-mail export only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -1994,6 +2002,8 @@ Keep the entire message (including attachments). Turning this option on
consumes lots of database space! Use only for debugging.


.. _config_hl7:

Options applicable to HL7 (v2) only
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -2192,6 +2202,8 @@ There is no penalty for leaving it at ``False`` except perhaps a slight
reduction in speed.


.. _config_file:

Options applicable to file transfers and attachments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
25 changes: 20 additions & 5 deletions docs/source/tasks/isaaq10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,24 @@ Intellectual property rights
ISAAQ (all versions) cannot be reproduced, modified, and/or published without
prior written permission of the copyright holders.

- Approved for inclusion in CamCOPS on the "non-commercial" basis. "I am
happy for the ISAAQ-10 and ISAAQ Part B to be fully public on CamCOPS for
those who declare the commercial “no”." (Konstantinos Ioannidis to Martin
Burchell and Rudolf Cardinal, and approved by Sam Chamberlain, 13 Feb
2023.)


History
~~~~~~~

- Ioannidis K, Tiego J, Lutz N, Omrawo C, Yücel M, Grant JE, Lochner C,
Chamberlain SR. Internet severity and activities addiction questionnaire
(ISAAQ): Psychometrics of item response theory and clustering of online
activities. *Comprehensive Psychiatry* 122: 152366
https://doi.org/10.1016/j.comppsych.2023.152366
Chamberlain SR (2023). Internet severity and activities addiction
questionnaire (ISAAQ): Psychometrics of item response theory and clustering
of online activities. *Comprehensive Psychiatry* 122: 152366.
https://pubmed.ncbi.nlm.nih.gov/36702061/;
https://doi.org/10.1016/j.comppsych.2023.152366.

- Defines both the original 15-item ISAAQ and the ISAAQ-10.


Source
Expand All @@ -66,25 +74,32 @@ Source
- Young KS (1998). Internet Addiction: The Emergence of a New Clinical
Disorder. *CyberPsychology & Behavior* 1: 237–44.
https://doi.org/10.1089/cpb.1998.1.237

- American Psychiatric Association (2013). *Diagnostic and Statistical Manual
of Mental Disorders: DSM-5.*
American Psychiatric Association, Washington, DC.

- Ioannidis K, Chamberlain SR, Tredder M, Kiraly F, Redden S, Stein DJ,
Lochner C, Grant JE (2018). Problematic internet use as an age-related
multifaceted problem: evidence from a two-site survey.
*Addict Behav* 81: 157.166.
https://pubmed.ncbi.nlm.nih.gov/29459201/

- Chamberlain SR, Redden SA, Stein DJ, Lochner C, Grant JE (2017). Impact of
obsessive-compulsive personality disorder symptoms in Internet users.
*Ann Clin Psychiatry* 29: 173-181.
https://pubmed.ncbi.nlm.nih.gov/28738097/

- Ioannidis K, Chamberlain SR, Tredder M, Kiraly F, Leppink E, Redden S,
Stein DJ, Lochner C, Grant JE (2016). Problematic internet use (PIU):
Associations with the impulsive-compulsive spectrum. An application of
machine learning in psychiatry.
*J Psych Res* 83: 94-102.
https://pubmed.ncbi.nlm.nih.gov/27580487/

- Fineberg NA, Demetrovics Z, Stein DJ, Ioannidis K, Potenza MN, Grünblatt E,
et al (2018). Manifesto for a European research network into Problematic
et al. (2018). Manifesto for a European research network into Problematic
Usage of the Internet.
*European Neuropsychopharmacology* 28: 1232-1246.
https://pubmed.ncbi.nlm.nih.gov/30509450/;
https://doi.org/10.1016/j.euroneuro.2018.08.004
3 changes: 2 additions & 1 deletion server/camcops_server/alembic/versions/0001_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ def upgrade():
sa.Column("success", sa.Boolean(), nullable=True),
sa.Column("failure_reason", sa.Text(), nullable=True),
# Next one altered 2018-11-09 for SQL Server:
# sa.Column('message', sa.UnicodeText(length=4294967295), nullable=True), # noqa: E501
# sa.Column('message',
# sa.UnicodeText(length=4294967295), nullable=True),
sa.Column(
"message",
sa.UnicodeText().with_variant(mysql.LONGTEXT, "mysql"),
Expand Down
36 changes: 18 additions & 18 deletions server/camcops_server/alembic/versions/0030_chi_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def upgrade():
"q1",
sa.Integer(),
nullable=True,
comment=( # noqa: E501
comment=(
"Q1 (hate unfinished task) (0 strongly disagree - 3 strongly"
" agree)"
),
Expand All @@ -86,7 +86,7 @@ def upgrade():
"q3",
sa.Integer(),
nullable=True,
comment=( # noqa: E501
comment=(
"Q3 (keep doing task) (0 strongly disagree - 3 strongly agree)"
),
),
Expand All @@ -112,7 +112,7 @@ def upgrade():
"q7",
sa.Integer(),
nullable=True,
comment=( # noqa: E501
comment=(
"Q7 (stubborn rigid) (0 strongly disagree - 3 strongly agree)"
),
),
Expand All @@ -126,7 +126,7 @@ def upgrade():
"q9",
sa.Integer(),
nullable=True,
comment=( # noqa: E501
comment=(
"Q9 (rewarding things) (0 strongly disagree - 3 strongly"
" agree)"
),
Expand All @@ -143,7 +143,7 @@ def upgrade():
"q11",
sa.Integer(),
nullable=True,
comment=( # noqa: E501
comment=(
"Q11 (higher standards) (0 strongly disagree - 3 strongly"
" agree)"
),
Expand All @@ -166,7 +166,7 @@ def upgrade():
"q14",
sa.Integer(),
nullable=True,
comment=( # noqa: E501
comment=(
"Q14 (avoid situations) (0 strongly disagree - 3 strongly"
" agree)"
),
Expand Down Expand Up @@ -207,7 +207,7 @@ def upgrade():
"clinician_professional_registration",
sa.Text(),
nullable=True,
comment=( # noqa: E501
comment=(
"(CLINICIAN) Clinician's professional registration (e.g. GMC#"
" 12345)"
),
Expand All @@ -222,7 +222,7 @@ def upgrade():
"clinician_service",
sa.Text(),
nullable=True,
comment=( # noqa: E501
comment=(
"(CLINICIAN) Clinician's service (e.g. Liaison Psychiatry"
" Service)"
),
Expand All @@ -231,7 +231,7 @@ def upgrade():
"clinician_contact_details",
sa.Text(),
nullable=True,
comment=( # noqa: E501
comment=(
"(CLINICIAN) Clinician's contact details (e.g. bleep,"
" extension)"
),
Expand All @@ -256,7 +256,7 @@ def upgrade():
"firstexit_is_finish",
sa.Boolean(),
nullable=True,
comment=( # noqa: E501
comment=(
"(TASK) Was the first exit from the task because it was"
" finished (1)?"
),
Expand All @@ -265,7 +265,7 @@ def upgrade():
"firstexit_is_abort",
sa.Boolean(),
nullable=True,
comment=( # noqa: E501
comment=(
"(TASK) Was the first exit from this task because it was"
" aborted (1)?"
),
Expand Down Expand Up @@ -293,7 +293,7 @@ def upgrade():
"_era",
sa.String(length=32),
nullable=False,
comment=( # noqa: E501
comment=(
"(SERVER) 'NOW', or when this row was preserved and removed"
" from the source device (UTC ISO 8601)"
),
Expand All @@ -314,7 +314,7 @@ def upgrade():
"_when_added_batch_utc",
sa.DateTime(),
nullable=True,
comment=( # noqa: E501
comment=(
"(SERVER) Date/time of the upload batch that added this row"
" (DATETIME in UTC)"
),
Expand All @@ -329,7 +329,7 @@ def upgrade():
"_when_removed_exact",
PendulumDateTimeAsIsoTextColType(length=32),
nullable=True,
comment=( # noqa: E501
comment=(
"(SERVER) Date/time this row was removed, i.e. made not"
" current (ISO 8601)"
),
Expand All @@ -338,7 +338,7 @@ def upgrade():
"_when_removed_batch_utc",
sa.DateTime(),
nullable=True,
comment=( # noqa: E501
comment=(
"(SERVER) Date/time of the upload batch that removed this row"
" (DATETIME in UTC)"
),
Expand All @@ -359,7 +359,7 @@ def upgrade():
"_forcibly_preserved",
sa.Boolean(),
nullable=True,
comment=( # noqa: E501
comment=(
"(SERVER) Forcibly preserved by superuser (rather than"
" normally preserved by tablet)?"
),
Expand All @@ -374,7 +374,7 @@ def upgrade():
"_successor_pk",
sa.Integer(),
nullable=True,
comment=( # noqa: E501
comment=(
"(SERVER) PK of successor record (after modification) or NULL"
" (whilst live, or after deletion)"
),
Expand Down Expand Up @@ -431,7 +431,7 @@ def upgrade():
"when_last_modified",
PendulumDateTimeAsIsoTextColType(length=32),
nullable=True,
comment=( # noqa: E501
comment=(
"(STANDARD) Date/time this row was last modified on the source"
" tablet device (ISO 8601)"
),
Expand Down

0 comments on commit e9eb03b

Please sign in to comment.