diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea782..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md deleted file mode 100644 index 48d5f81fa..000000000 --- a/.github/ISSUE_TEMPLATE/custom.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Custom issue template -about: Describe this issue template's purpose here. -title: '' -labels: '' -assignees: '' - ---- - - diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7d6..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.gitignore b/.gitignore index 8d35cb327..e36bbaa62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,8 @@ -__pycache__ -*.pyc +.idea/ +.history/ +.vscode +__pycache__/ +*/__pycache__/ +.github/ +configs/ +*.pyc \ No newline at end of file diff --git a/configs/nginx/nginx.conf b/configs/nginx/nginx.conf deleted file mode 100644 index dc9671d2c..000000000 --- a/configs/nginx/nginx.conf +++ /dev/null @@ -1,84 +0,0 @@ -# For more information on configuration, see: -# * Official English Documentation: http://nginx.org/en/docs/ -# * Official Russian Documentation: http://nginx.org/ru/docs/ - -user nginx; -worker_processes auto; -error_log /var/log/nginx/error.log; -pid /run/nginx.pid; - -# Load dynamic modules. See /usr/share/nginx/README.dynamic. -include /usr/share/nginx/modules/*.conf; - -events { - worker_connections 1024; -} - -http { - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - # Load modular configuration files from the /etc/nginx/conf.d directory. - # See http://nginx.org/en/docs/ngx_core_module.html#include - # for more information. - include /etc/nginx/conf.d/*.conf; - - server { - listen 80; - server_name _; - - location = favicon.ico { access_log off; log_not_found off; } - location /static/ { - root /home/vagrant/cpims; - } - - location / { - include uwsgi_params; - uwsgi_pass unix:/run/uwsgi/cpims.sock; - } -} - -# Settings for a TLS enabled server. -# -# server { -# listen 443 ssl http2 default_server; -# listen [::]:443 ssl http2 default_server; -# server_name _; -# root /usr/share/nginx/html; -# -# ssl_certificate "/etc/pki/nginx/server.crt"; -# ssl_certificate_key "/etc/pki/nginx/private/server.key"; -# ssl_session_cache shared:SSL:1m; -# ssl_session_timeout 10m; -# ssl_ciphers HIGH:!aNULL:!MD5; -# ssl_prefer_server_ciphers on; -# -# # Load configuration files for the default server block. -# include /etc/nginx/default.d/*.conf; -# -# location / { -# } -# -# error_page 404 /404.html; -# location = /40x.html { -# } -# -# error_page 500 502 503 504 /50x.html; -# location = /50x.html { -# } -# } - -} - diff --git a/configs/postgresql/pg_hba.conf b/configs/postgresql/pg_hba.conf deleted file mode 100644 index 0b1cbf64c..000000000 --- a/configs/postgresql/pg_hba.conf +++ /dev/null @@ -1,89 +0,0 @@ -# PostgreSQL Client Authentication Configuration File -# =================================================== -# -# Refer to the "Client Authentication" section in the PostgreSQL -# documentation for a complete description of this file. A short -# synopsis follows. -# -# This file controls: which hosts are allowed to connect, how clients -# are authenticated, which PostgreSQL user names they can use, which -# databases they can access. Records take one of these forms: -# -# local DATABASE USER METHOD [OPTIONS] -# host DATABASE USER ADDRESS METHOD [OPTIONS] -# hostssl DATABASE USER ADDRESS METHOD [OPTIONS] -# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS] -# -# (The uppercase items must be replaced by actual values.) -# -# The first field is the connection type: "local" is a Unix-domain -# socket, "host" is either a plain or SSL-encrypted TCP/IP socket, -# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a -# plain TCP/IP socket. -# -# DATABASE can be "all", "sameuser", "samerole", "replication", a -# database name, or a comma-separated list thereof. The "all" -# keyword does not match "replication". Access to replication -# must be enabled in a separate record (see example below). -# -# USER can be "all", a user name, a group name prefixed with "+", or a -# comma-separated list thereof. In both the DATABASE and USER fields -# you can also write a file name prefixed with "@" to include names -# from a separate file. -# -# ADDRESS specifies the set of hosts the record matches. It can be a -# host name, or it is made up of an IP address and a CIDR mask that is -# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that -# specifies the number of significant bits in the mask. A host name -# that starts with a dot (.) matches a suffix of the actual host name. -# Alternatively, you can write an IP address and netmask in separate -# columns to specify the set of hosts. Instead of a CIDR-address, you -# can write "samehost" to match any of the server's own IP addresses, -# or "samenet" to match any address in any subnet that the server is -# directly connected to. -# -# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi", -# "ident", "peer", "pam", "ldap", "radius" or "cert". Note that -# "password" sends passwords in clear text; "md5" is preferred since -# it sends encrypted passwords. -# -# OPTIONS are a set of options for the authentication in the format -# NAME=VALUE. The available options depend on the different -# authentication methods -- refer to the "Client Authentication" -# section in the documentation for a list of which options are -# available for which authentication methods. -# -# Database and user names containing spaces, commas, quotes and other -# special characters must be quoted. Quoting one of the keywords -# "all", "sameuser", "samerole" or "replication" makes the name lose -# its special character, and just match a database or username with -# that name. -# -# This file is read on server startup and when the postmaster receives -# a SIGHUP signal. If you edit the file on a running system, you have -# to SIGHUP the postmaster for the changes to take effect. You can -# use "pg_ctl reload" to do that. - -# Put your actual configuration here -# ---------------------------------- -# -# If you want to allow non-local connections, you need to add more -# "host" records. In that case you will also need to make PostgreSQL -# listen on a non-local interface via the listen_addresses -# configuration parameter, or via the -i or -h command line switches. - - - -# TYPE DATABASE USER ADDRESS METHOD - -# "local" is for Unix domain socket connections only -local all all peer -# IPv4 local connections: -host all all 127.0.0.1/32 md5 -# IPv6 local connections: -host all all ::1/128 md5 -# Allow replication connections from localhost, by a user with the -# replication privilege. -#local replication postgres peer -#host replication postgres 127.0.0.1/32 ident -#host replication postgres ::1/128 ident diff --git a/configs/postgresql/postgresql.conf b/configs/postgresql/postgresql.conf deleted file mode 100644 index 1854c098a..000000000 --- a/configs/postgresql/postgresql.conf +++ /dev/null @@ -1,609 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = 'localhost' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -port = 5432 # (change requires restart) -max_connections = 100 # (change requires restart) -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directories = '/tmp' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -#authentication_timeout = 1min # 1s-600s -#ssl = off # (change requires restart) -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers - # (change requires restart) -#ssl_prefer_server_ciphers = on # (change requires restart) -#ssl_ecdh_curve = 'prime256v1' # (change requires restart) -#ssl_renegotiation_limit = 0 # amount of data between renegotiations -#ssl_cert_file = 'server.crt' # (change requires restart) -#ssl_key_file = 'server.key' # (change requires restart) -#ssl_ca_file = '' # (change requires restart) -#ssl_crl_file = '' # (change requires restart) -#password_encryption = on -#db_user_namespace = off - -# GSSAPI using Kerberos -#krb_server_keyfile = '' -#krb_caseins_users = off - -# - TCP Keepalives - -# see "man 7 tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = 128MB # min 128kB - # (change requires restart) -#huge_pages = try # on, off, or try - # (change requires restart) -#temp_buffers = 8MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Caution: it is not advisable to set max_prepared_transactions nonzero unless -# you actively intend to use prepared transactions. -#work_mem = 4MB # min 64kB -#maintenance_work_mem = 64MB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem -#max_stack_depth = 2MB # min 100kB -dynamic_shared_memory_type = posix # the default is the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # use none to disable dynamic shared memory - -# - Disk - - -#temp_file_limit = -1 # limits per-session temp file space - # in kB, or -1 for no limit - -# - Kernel Resource Usage - - -#max_files_per_process = 1000 # min 25 - # (change requires restart) -#shared_preload_libraries = '' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 10 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching -#max_worker_processes = 8 - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = minimal # minimal, archive, hot_standby, or logical - # (change requires restart) -#fsync = on # turns forced synchronization on or off -#synchronous_commit = on # synchronization level; - # off, local, remote_write, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_log_hints = off # also do full page writes of non-critical updates - # (change requires restart) -#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each -#checkpoint_timeout = 5min # range 30s-1h -#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_warning = 30s # 0 disables - -# - Archiving - - -#archive_mode = off # allows archiving to be done - # (change requires restart) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Server(s) - - -# Set these on the master and on any standby that will send replication data. - -#max_wal_senders = 0 # max number of walsender processes - # (change requires restart) -#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables - -#max_replication_slots = 0 # max number of replication slots -#track_commit_timestamp = off # collect timestamp of transaction commit - # (change requires restart) - -# - Master Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a master server. - -#hot_standby = off # "on" allows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from master - # in milliseconds; 0 disables - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_bitmapscan = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -#random_page_cost = 4.0 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#effective_cache_size = 4GB - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -#default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -logging_collector = on # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -log_directory = 'pg_log' # directory where log files are written, - # can be absolute or relative to PGDATA -log_filename = 'postgresql-%a.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -log_truncate_on_rotation = on # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -log_rotation_size = 0 # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' - -# This is only relevant when logging to eventlog (win32): -#event_source = 'PostgreSQL' - -# - When to Log - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_checkpoints = off -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -log_line_prefix = '< %m >' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_statement = 'none' # none, ddl, mod, all -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = 'UTC' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -#track_activities = on -#track_counts = on -#track_io_timing = off -#track_functions = none # none, pl, all -#track_activity_query_size = 1024 # (change requires restart) -#update_process_title = on -#stats_temp_directory = 'pg_stat_tmp' - - -# - Statistics Monitoring - - -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off -#log_statement_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#search_path = '"$user",public' # schema names -#default_tablespace = '' # a tablespace name, '' uses the default -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_min_age = 50000000 -#vacuum_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_freeze_table_age = 150000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_fuzzy_search_limit = 0 - -# - Locale and Formatting - - -datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -timezone = 'UTC' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 0 # min -15, max 3 -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = 'en_US.UTF-8' # locale for system error message - # strings -lc_monetary = 'en_US.UTF-8' # locale for monetary formatting -lc_numeric = 'en_US.UTF-8' # locale for number formatting -lc_time = 'en_US.UTF-8' # locale for time formatting - -# default configuration for text search -default_text_search_config = 'pg_catalog.english' - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#local_preload_libraries = '' -#session_preload_libraries = '' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) - - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#default_with_oids = off -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#sql_inheritance = on -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. - -#include_dir = 'conf.d' # include files ending in '.conf' from - # directory 'conf.d' -#include_if_exists = 'exists.conf' # include file only if it exists -#include = 'special.conf' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/configs/selinux/config b/configs/selinux/config deleted file mode 100644 index 5ad120f72..000000000 --- a/configs/selinux/config +++ /dev/null @@ -1,14 +0,0 @@ - -# This file controls the state of SELinux on the system. -# SELINUX= can take one of these three values: -# enforcing - SELinux security policy is enforced. -# permissive - SELinux prints warnings instead of enforcing. -# disabled - No SELinux policy is loaded. -SELINUX=permissive -# SELINUXTYPE= can take one of three two values: -# targeted - Targeted processes are protected, -# minimum - Modification of targeted policy. Only selected processes are protected. -# mls - Multi Level Security protection. -SELINUXTYPE=targeted - - diff --git a/configs/uwsgi/cpims.ini b/configs/uwsgi/cpims.ini deleted file mode 100644 index 0b1906105..000000000 --- a/configs/uwsgi/cpims.ini +++ /dev/null @@ -1,22 +0,0 @@ -[uwsgi] -project = cpims -username = vagrant -base = /home/%(username) -chdir = %(base)/%(project) -home = %(base)/.envs/cpims_app -module = %(project).wsgi:application -master = true -processes = 10 -threads = 10 -enable-threads = True -uid = %(username) -socket = /run/uwsgi/%(project).sock -chown-socket = %(username):nginx -chmod-socket = 660 -vacuum = true -env = CPIMS_HOST=localhost -env = CPIMS_DB=cpims -env = CPIMS_DEBUG=True -env = CPIMS_PORT=5432 -env = CPIMS_DBUSER=cpimsuser -env = CPIMS_PASSWORD=password diff --git a/contributors.txt b/contributors.txt index cb25acc58..fe94aafed 100644 --- a/contributors.txt +++ b/contributors.txt @@ -1 +1,2 @@ Koske Kimutai +Michael Wekesa diff --git a/cpims/__pycache__/__init__.cpython-310.pyc b/cpims/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 4e7446d44..000000000 Binary files a/cpims/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/cpims/__pycache__/apps.cpython-310.pyc b/cpims/__pycache__/apps.cpython-310.pyc deleted file mode 100644 index 7b9c8c70a..000000000 Binary files a/cpims/__pycache__/apps.cpython-310.pyc and /dev/null differ diff --git a/cpims/__pycache__/logging_config.cpython-310.pyc b/cpims/__pycache__/logging_config.cpython-310.pyc deleted file mode 100644 index ed8d5456c..000000000 Binary files a/cpims/__pycache__/logging_config.cpython-310.pyc and /dev/null differ diff --git a/cpims/__pycache__/settings.cpython-310.pyc b/cpims/__pycache__/settings.cpython-310.pyc deleted file mode 100644 index 21e8917dc..000000000 Binary files a/cpims/__pycache__/settings.cpython-310.pyc and /dev/null differ diff --git a/cpims/__pycache__/urls.cpython-310.pyc b/cpims/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index d6263da7d..000000000 Binary files a/cpims/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpims/__pycache__/views.cpython-310.pyc b/cpims/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 5b9959550..000000000 Binary files a/cpims/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpims/settings.py b/cpims/settings.py index 08ab47cdb..011fb9c0b 100644 --- a/cpims/settings.py +++ b/cpims/settings.py @@ -94,7 +94,6 @@ 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'cpovc_main.context_processors.global_settings', - 'simple_forums.context_processors.installed_apps', ], diff --git a/cpovc_access/__pycache__/__init__.cpython-310.pyc b/cpovc_access/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index f445ec79c..000000000 Binary files a/cpovc_access/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/admin.cpython-310.pyc b/cpovc_access/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index 3d2ebdcb7..000000000 Binary files a/cpovc_access/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/apps.cpython-310.pyc b/cpovc_access/__pycache__/apps.cpython-310.pyc deleted file mode 100644 index 6b4fe4baf..000000000 Binary files a/cpovc_access/__pycache__/apps.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/authentication.cpython-310.pyc b/cpovc_access/__pycache__/authentication.cpython-310.pyc deleted file mode 100644 index 98e29fafe..000000000 Binary files a/cpovc_access/__pycache__/authentication.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/decorators.cpython-310.pyc b/cpovc_access/__pycache__/decorators.cpython-310.pyc deleted file mode 100644 index b37d396c0..000000000 Binary files a/cpovc_access/__pycache__/decorators.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/forms.cpython-310.pyc b/cpovc_access/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index 594c6a6ef..000000000 Binary files a/cpovc_access/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/functions.cpython-310.pyc b/cpovc_access/__pycache__/functions.cpython-310.pyc deleted file mode 100644 index 9ba02a456..000000000 Binary files a/cpovc_access/__pycache__/functions.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/handlers.cpython-310.pyc b/cpovc_access/__pycache__/handlers.cpython-310.pyc deleted file mode 100644 index fcd875eeb..000000000 Binary files a/cpovc_access/__pycache__/handlers.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/models.cpython-310.pyc b/cpovc_access/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 70098529f..000000000 Binary files a/cpovc_access/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/password_change.cpython-310.pyc b/cpovc_access/__pycache__/password_change.cpython-310.pyc deleted file mode 100644 index 844b0425d..000000000 Binary files a/cpovc_access/__pycache__/password_change.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/password_strength.cpython-310.pyc b/cpovc_access/__pycache__/password_strength.cpython-310.pyc deleted file mode 100644 index ed2ae4e4f..000000000 Binary files a/cpovc_access/__pycache__/password_strength.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/settings.cpython-310.pyc b/cpovc_access/__pycache__/settings.cpython-310.pyc deleted file mode 100644 index 114016699..000000000 Binary files a/cpovc_access/__pycache__/settings.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/signals.cpython-310.pyc b/cpovc_access/__pycache__/signals.cpython-310.pyc deleted file mode 100644 index f325c72df..000000000 Binary files a/cpovc_access/__pycache__/signals.cpython-310.pyc and /dev/null differ diff --git a/cpovc_access/__pycache__/views.cpython-310.pyc b/cpovc_access/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 2f979df08..000000000 Binary files a/cpovc_access/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/__init__.cpython-310.pyc b/cpovc_auth/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index c4a4c0410..000000000 Binary files a/cpovc_auth/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/admin.cpython-310.pyc b/cpovc_auth/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index f6a43d613..000000000 Binary files a/cpovc_auth/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/decorators.cpython-310.pyc b/cpovc_auth/__pycache__/decorators.cpython-310.pyc deleted file mode 100644 index 73384c71b..000000000 Binary files a/cpovc_auth/__pycache__/decorators.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/forms.cpython-310.pyc b/cpovc_auth/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index 109ac5834..000000000 Binary files a/cpovc_auth/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/functions.cpython-310.pyc b/cpovc_auth/__pycache__/functions.cpython-310.pyc deleted file mode 100644 index fb776230c..000000000 Binary files a/cpovc_auth/__pycache__/functions.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/models.cpython-310.pyc b/cpovc_auth/__pycache__/models.cpython-310.pyc deleted file mode 100644 index cab76dc92..000000000 Binary files a/cpovc_auth/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/perms.cpython-310.pyc b/cpovc_auth/__pycache__/perms.cpython-310.pyc deleted file mode 100644 index 188f99448..000000000 Binary files a/cpovc_auth/__pycache__/perms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/urls.cpython-310.pyc b/cpovc_auth/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index dcfce4727..000000000 Binary files a/cpovc_auth/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_auth/__pycache__/views.cpython-310.pyc b/cpovc_auth/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 51960c702..000000000 Binary files a/cpovc_auth/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_dashboard/__pycache__/__init__.cpython-310.pyc b/cpovc_dashboard/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index b2f6aba97..000000000 Binary files a/cpovc_dashboard/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/cpovc_dashboard/__pycache__/charts.cpython-310.pyc b/cpovc_dashboard/__pycache__/charts.cpython-310.pyc deleted file mode 100644 index bf11e5ff5..000000000 Binary files a/cpovc_dashboard/__pycache__/charts.cpython-310.pyc and /dev/null differ diff --git a/cpovc_dashboard/__pycache__/forms.cpython-310.pyc b/cpovc_dashboard/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index c5f78548e..000000000 Binary files a/cpovc_dashboard/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_dashboard/__pycache__/functions.cpython-310.pyc b/cpovc_dashboard/__pycache__/functions.cpython-310.pyc deleted file mode 100644 index 8a5a44c56..000000000 Binary files a/cpovc_dashboard/__pycache__/functions.cpython-310.pyc and /dev/null differ diff --git a/cpovc_dashboard/__pycache__/parameters.cpython-310.pyc b/cpovc_dashboard/__pycache__/parameters.cpython-310.pyc deleted file mode 100644 index 9d5edbf4e..000000000 Binary files a/cpovc_dashboard/__pycache__/parameters.cpython-310.pyc and /dev/null differ diff --git a/cpovc_dashboard/__pycache__/queries.cpython-310.pyc b/cpovc_dashboard/__pycache__/queries.cpython-310.pyc deleted file mode 100644 index affd6716d..000000000 Binary files a/cpovc_dashboard/__pycache__/queries.cpython-310.pyc and /dev/null differ diff --git a/cpovc_dashboard/__pycache__/urls.cpython-310.pyc b/cpovc_dashboard/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index d52ae0702..000000000 Binary files a/cpovc_dashboard/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_dashboard/__pycache__/views.cpython-310.pyc b/cpovc_dashboard/__pycache__/views.cpython-310.pyc deleted file mode 100644 index ef34ec363..000000000 Binary files a/cpovc_dashboard/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_forms/__pycache__/admin.cpython-310.pyc b/cpovc_forms/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index 4c130dd1b..000000000 Binary files a/cpovc_forms/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_forms/__pycache__/documents.cpython-310.pyc b/cpovc_forms/__pycache__/documents.cpython-310.pyc deleted file mode 100644 index 6b5d41db7..000000000 Binary files a/cpovc_forms/__pycache__/documents.cpython-310.pyc and /dev/null differ diff --git a/cpovc_forms/__pycache__/forms.cpython-310.pyc b/cpovc_forms/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index 17efa14f8..000000000 Binary files a/cpovc_forms/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_forms/__pycache__/functions.cpython-310.pyc b/cpovc_forms/__pycache__/functions.cpython-310.pyc deleted file mode 100644 index b60692b4e..000000000 Binary files a/cpovc_forms/__pycache__/functions.cpython-310.pyc and /dev/null differ diff --git a/cpovc_forms/__pycache__/models.cpython-310.pyc b/cpovc_forms/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 3e0824bbe..000000000 Binary files a/cpovc_forms/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_forms/__pycache__/urls.cpython-310.pyc b/cpovc_forms/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index 3fa5295e6..000000000 Binary files a/cpovc_forms/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_forms/__pycache__/views.cpython-310.pyc b/cpovc_forms/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 42bcca71f..000000000 Binary files a/cpovc_forms/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_forms/forms.py b/cpovc_forms/forms.py index b932f721f..125ce85c8 100644 --- a/cpovc_forms/forms.py +++ b/cpovc_forms/forms.py @@ -7,8 +7,8 @@ from cpovc_registry.functions import get_geo_list, get_all_geo_list from cpovc_registry.models import RegOrgUnit from cpovc_main.models import SchoolList -from .functions import get_facility_list - +from cpovc_ovc.models import OVCFacility +from django.db.models.fields import BLANK_CHOICE_DASH # New lists WB_AD_GEN_5_ChoiceList=WB_AD_SAF_32_6_CHOICELIST=WB_AD_SAF_32_2_CHOICELIST=WB_AD_SAF_28_CHOICELIST=WB_AD_SAF_27_1_CHOICELIST=WB_AD_SAF_26_CHOICELIST=WB_AD_HEL_24_1_CHOICELIST=WB_AD_HEL_21_1_CHOICELIST=WB_AD_SCH_7_CHOICELIST=WB_AD_SCH_12_2_CHOICELIST=WB_AD_HEL_20_4_CHOICELIST=WB_AD_SCH_13_2_CHOICELIST = (('TBD1', 'TBD1'), ('TBD2', 'TBD2'),('TBD3', 'TBD3')) YESNO_CHOICES = (('AYES', 'Yes'), ('ANNO', 'No')) @@ -88,7 +88,7 @@ 'alternative_family_care_type_id', 'Please Select') type_of_adoption_list = get_list('adoption_id', 'Please Select') bursary_type_list = get_list('bursary_type_id', 'Select Bursary Type') -school_type_list = get_list('school_category_id', 'Please Select') +school_type_list = ('school_category_id', 'Please Select') term_list = get_list('school_term_id', 'Select Term Awarded') schoolout_reason_list = get_list('out_of_school_id', 'Please Select') school_admission_type_list = get_list('school_type_id', 'Please Select') @@ -6339,7 +6339,7 @@ class WellbeingAdolescentForm(forms.Form): # HIV Screening Form class HIV_SCREENING_FORM(forms.Form): - org_units_list = get_facility_list() + org_units_list = [('', 'Please Select')] + list(OVCFacility.objects.filter().values_list('id', 'facility_name')) HIV_RA_1A = forms.DateField( widget = forms.widgets.DateInput( format="%m/%d/%Y", @@ -8180,3 +8180,393 @@ class DREAMS_FORM(forms.Form): #'data-parsley-required': "true", #'data-parsley-group': 'group0', 'rows': '3'})) + + + +# form new_graduation_monitoring_form +class NewGraduationMonitoringForm(forms.Form): + YES_NO_CHOICES = ((1, 'Yes'), (0, 'No')) + + date = forms.DateField(widget=forms.TextInput( + attrs={'placeholder': _('Date'), + 'class': 'form-control', + # type': 'hidden' + })) + BNMRK_1 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + BNMRK_2 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + BNMRK_3 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + BNMRK_4 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + BNMRK_5 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + BNMRK_6 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + BNMRK_7 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + BNMRK_8 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + BNMRK_9 = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + +# Sinovuyo care-giver Preventive Pre and Post Program Assessment Form +class OVCPreventivePrePostProgramAssessmentForm (forms.Form): + """ + Sinovuyo Care-giver Preventive Pre and Post Program Assessment Form + """ + CHOICES_TYPE_ASSESSMENT = get_list("programme_id") + CHOICES_READ = get_list('literacy_lvl_id', "Please select") + CHOICES_EDUCATION = get_list("school_level_id") + YES_NO_CHOICES = get_list('yesno_id') + CHOICES_INCOME = get_list("employed_id", "Please select") + CHOICES_RELATIONSHIP = get_list('relationship_caregiver_id', "Please select") + CHOICES_BEHAVIOR = get_list("my_behaviour_id", "Please select") + CHOICES_DISCIPLINE = get_list("dsp_times_id", "Please select") + CHOICES_BIOLOGICAL_FATHER = get_list("father_mortality_id", "Please select") + CHOICES_BIOLOGICAL_MOTHER = get_list("mother_mortality_id", "Please select") + CHOICES_HIV = get_list("under_care_id", "Please select") + CHOICES_FEELING = get_list("agree_id", "Please select") + CHOICES_SAD = get_list("feeling_sad_id", "Please select") + CHOICES_FINANCE = get_list("often_id", "Please select") + + type_of_assessment = forms.ChoiceField(choices=CHOICES_TYPE_ASSESSMENT, + widget = forms.RadioSelect()) + date_of_assessment = forms.DateTimeField( + input_formats=['%d/%m/%Y'], + widget=forms.DateTimeInput(attrs={ + 'class': 'form-control datetimepicker-input', + 'type': 'date', + 'data-target': '#datetimepicker1' + })) + # SECTION 1: BACKGROUND DETAILS + bd_read = forms.ChoiceField( + choices=CHOICES_READ, + widget=forms.Select(attrs={ + + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'bd_read', + })) + + bd_education_level = forms.ChoiceField( + choices=CHOICES_EDUCATION, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + bd_biological_children = forms.IntegerField() + + bd_non_biological_children = forms.IntegerField() + + bd_children_not_in_school = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + bd_source_income = forms.ChoiceField( + choices=CHOICES_INCOME, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'bd_source_income', + })) + + bd_adults_contribute_hh_income = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + bd_children_contribute_hh_income = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + bd_biological_mother = forms.ChoiceField( + choices=yesno_list, + widget=forms.Select(attrs={ + 'initial': 'Please select', + 'id': 'bd_biologocal_mother', + 'class': 'form-control', + } + )) + + bd_bm_live_hh = forms.ChoiceField( + choices=CHOICES_BIOLOGICAL_MOTHER,required=False, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'bd_bm_live_hh', + })) + + bd_biological_father = forms.ChoiceField( + choices=yesno_list, + widget=forms.Select(attrs={ + 'initial': 'Please select', + 'id': 'bd_biologocal_father', + 'class': 'form-control', + + } + )) + + bd_bf_live_hh = forms.ChoiceField( + choices=CHOICES_BIOLOGICAL_FATHER,required=False, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'bd_bf_live_hh', + })) + + bd_money_basic_expenses = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + bd_violence = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + + # renderer=RadioCustomRenderer, + )) + + bd_adult_unwell = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + + # renderer=RadioCustomRenderer, + )) + + bd_child_unwell = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + # renderer=RadioCustomRenderer, + )) + + bd_miss_school = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + + # renderer=RadioCustomRenderer, + )) + + + bd_hiv_status = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + + # renderer=RadioCustomRenderer, + )) + + bd_children_hiv_status = forms.ChoiceField( + choices=CHOICES_HIV, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'bd_children_hiv_status', + } + )) + + bd_hiv_prevention = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + + # renderer=RadioCustomRenderer, + )) + + bd_two_meals = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + + # renderer=RadioCustomRenderer, + )) + + bd_missing_meal = forms.ChoiceField( + choices=YES_NO_CHOICES, + widget=forms.RadioSelect( + + # renderer=RadioCustomRenderer, + )) + + # SECTION 2: MY RELATIONSHIP WITH MY CHILD + rc_discuss_child_needs = forms.ChoiceField( + choices=CHOICES_RELATIONSHIP, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'rc_discuss_child_needs', + })) + + rc_discipline = forms.ChoiceField( + choices=CHOICES_RELATIONSHIP, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'rc_discipline', + })) + + rc_tells_bothering = forms.ChoiceField( + choices=CHOICES_RELATIONSHIP, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'rc_tells_bothering', + })) + + rc_involve_decisions = forms.ChoiceField( + choices=CHOICES_RELATIONSHIP, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'rc_involve_decisions', + })) + + # SECTION 3: MY CHILD’S BEHAVIOUR + cb_child_obedient = forms.ChoiceField( + choices=CHOICES_BEHAVIOR, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'cb_child_obedient', + })) + + cb_figths_children = forms.ChoiceField( + choices=CHOICES_BEHAVIOR, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'cb_figths_children', + })) + + # SECTION 4: DISCIPLINING MY CHILD + dc_often_discipline = forms.ChoiceField( + choices=CHOICES_DISCIPLINE, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'dc_often_discipline', + })) + dc_physical_discipline = forms.ChoiceField( + choices=CHOICES_DISCIPLINE, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'dc_physical_discipline', + })) + + dc_upset_child = forms.ChoiceField( + choices=CHOICES_DISCIPLINE, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'dc_upset_child', + })) + + # SECTION 5: DEALING WITH STRESSFUL LIVES AS PARENTS + sp_caring_energy = forms.ChoiceField( + choices=CHOICES_FEELING, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'sp_caring_energy', + })) + sp_source_stress = forms.ChoiceField( + choices=CHOICES_FEELING, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'sp_source_stress', + })) + + sp_physical_punish = forms.ChoiceField( + choices=CHOICES_FEELING, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'sp_physical_punish', + })) + + # SECTION 6: FEELING SAD + fs_depressed = forms.ChoiceField( + choices=CHOICES_SAD, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'fs_depressed', + })) + + fs_effort = forms.ChoiceField( + choices=CHOICES_SAD, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'fs_depressed', + })) + + fs_hopeful = forms.ChoiceField( + choices=CHOICES_SAD, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'fs_depressed', + })) + + + # SECTION 7: FINANCES + fi_money_important_items = forms.ChoiceField( + choices=CHOICES_FINANCE, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'fi_money_important_items', + })) + + fi_worried_money = forms.ChoiceField( + choices=CHOICES_FINANCE, + widget=forms.Select(attrs={ + 'intial': 'Please select', + 'class': 'form-control', + 'id': 'fi_worried_money', + })) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) \ No newline at end of file diff --git a/cpovc_forms/migrations/0001_initial.py b/cpovc_forms/migrations/0001_initial.py new file mode 100644 index 000000000..b45cd25cf --- /dev/null +++ b/cpovc_forms/migrations/0001_initial.py @@ -0,0 +1,1310 @@ +# Generated by Django 4.0.2 on 2022-04-30 06:26 + +import datetime +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import django.utils.timezone +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('cpovc_main', '__first__'), + ('cpovc_ovc', '__first__'), + ('cpovc_registry', '__first__'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='ListBanks', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('bank_name', models.CharField(max_length=150)), + ('bank_code', models.CharField(max_length=10)), + ('is_void', models.BooleanField(default=False)), + ], + options={ + 'verbose_name': 'Bank', + 'verbose_name_plural': 'Banks', + 'db_table': 'list_bank', + }, + ), + migrations.CreateModel( + name='OVCAdverseEventsFollowUp', + fields=[ + ('adverse_condition_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('adverse_condition_description', models.CharField(max_length=20)), + ('attendance_type', models.CharField(max_length=4, null=True)), + ('referral_type', models.CharField(max_length=4, null=True)), + ('adverse_event_date', models.DateField(default=django.utils.timezone.now, null=True)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_adverseevents_followup', + }, + ), + migrations.CreateModel( + name='OVCCareEvents', + fields=[ + ('event', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('event_type_id', models.CharField(max_length=10)), + ('event_counter', models.IntegerField(default=0)), + ('event_score', models.IntegerField(default=0, null=True)), + ('date_of_event', models.DateField(default=django.utils.timezone.now)), + ('date_of_previous_event', models.DateTimeField(null=True)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('house_hold', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ('person', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_care_events', + }, + ), + migrations.CreateModel( + name='OVCCareForms', + fields=[ + ('form_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=50)), + ('description', models.CharField(max_length=255)), + ('is_void', models.BooleanField(default=False)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ], + options={ + 'db_table': 'ovc_care_forms', + }, + ), + migrations.CreateModel( + name='OVCCareQuestions', + fields=[ + ('question_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('code', models.CharField(max_length=5)), + ('question', models.CharField(max_length=55)), + ('domain', models.CharField(max_length=10)), + ('question_text', models.CharField(max_length=255)), + ('question_type', models.CharField(max_length=20)), + ('is_void', models.BooleanField(default=False)), + ('timestamp_created', models.DateTimeField(auto_now_add=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareforms')), + ], + options={ + 'db_table': 'ovc_care_questions', + }, + ), + migrations.CreateModel( + name='OVCCaseCategory', + fields=[ + ('case_category_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('case_category', models.CharField(max_length=4)), + ('case_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('date_of_event', models.DateField(default=django.utils.timezone.now)), + ('place_of_event', models.CharField(max_length=4)), + ('case_nature', models.CharField(max_length=4)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ], + options={ + 'db_table': 'ovc_case_category', + }, + ), + migrations.CreateModel( + name='OVCCaseEvents', + fields=[ + ('case_event_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('case_event_type_id', models.CharField(max_length=20)), + ('date_of_event', models.DateField(default=django.utils.timezone.now)), + ('case_event_details', models.CharField(max_length=100)), + ('case_event_notes', models.CharField(blank=True, max_length=1000)), + ('case_event_outcome', models.CharField(max_length=250, null=True)), + ('next_hearing_date', models.DateField(null=True)), + ('next_mention_date', models.DateField(null=True)), + ('plea_taken', models.CharField(max_length=4, null=True)), + ('application_outcome', models.CharField(max_length=4, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('app_user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'db_table': 'ovc_case_events', + }, + ), + migrations.CreateModel( + name='OVCCaseRecord', + fields=[ + ('case_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('case_serial', models.CharField(default='XXXX', max_length=50)), + ('perpetrator_status', models.CharField(default='PKNW', max_length=20)), + ('perpetrator_first_name', models.CharField(max_length=50, null=True)), + ('perpetrator_other_names', models.CharField(max_length=50, null=True)), + ('perpetrator_surname', models.CharField(max_length=50, null=True)), + ('perpetrator_relationship_type', models.CharField(max_length=50, null=True)), + ('risk_level', models.CharField(max_length=50)), + ('date_case_opened', models.DateField(default=datetime.date.today)), + ('case_reporter_first_name', models.CharField(max_length=50, null=True)), + ('case_reporter_other_names', models.CharField(max_length=50, null=True)), + ('case_reporter_surname', models.CharField(max_length=50, null=True)), + ('case_reporter_contacts', models.CharField(max_length=20, null=True)), + ('case_reporter', models.CharField(blank=True, max_length=20)), + ('court_name', models.CharField(max_length=200, null=True)), + ('court_number', models.CharField(max_length=50, null=True)), + ('police_station', models.CharField(max_length=200, null=True)), + ('ob_number', models.CharField(max_length=50, null=True)), + ('case_status', models.CharField(default='ACTIVE', max_length=50)), + ('referral_present', models.CharField(default='AYES', max_length=10)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('parent_case_id', models.UUIDField(null=True)), + ('created_by', models.IntegerField(default=404, null=True)), + ('case_remarks', models.CharField(max_length=1000, null=True)), + ('date_of_summon', models.DateField(null=True)), + ('summon_status', models.BooleanField(default=None, null=True)), + ('case_stage', models.IntegerField(default=0)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_case_record', + }, + ), + migrations.CreateModel( + name='OVCEducationFollowUp', + fields=[ + ('education_followup_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('admitted_to_school', models.CharField(max_length=10)), + ('admission_to_school_date', models.DateField(default=django.utils.timezone.now, null=True)), + ('education_comments', models.CharField(max_length=1000, null=True)), + ('not_in_school_reason', models.CharField(max_length=4, null=True)), + ('school_admission_type', models.CharField(max_length=4, null=True)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_education_followup', + }, + ), + migrations.CreateModel( + name='OVCMedical', + fields=[ + ('medical_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('mental_condition', models.CharField(max_length=50)), + ('physical_condition', models.CharField(max_length=50)), + ('other_condition', models.CharField(max_length=50)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_medical', + }, + ), + migrations.CreateModel( + name='OVCPlacement', + fields=[ + ('placement_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('residential_institution_name', models.CharField(blank=True, max_length=100)), + ('admission_date', models.DateField(default=django.utils.timezone.now, null=True)), + ('admission_type', models.CharField(blank=True, max_length=4)), + ('transfer_from', models.CharField(max_length=100, null=True)), + ('admission_reason', models.CharField(blank=True, max_length=100)), + ('holding_period', models.IntegerField(null=True)), + ('committing_period_units', models.CharField(max_length=4, null=True)), + ('committing_period', models.IntegerField(null=True)), + ('current_residential_status', models.CharField(max_length=4)), + ('has_court_committal_order', models.CharField(max_length=4)), + ('free_for_adoption', models.CharField(max_length=4, null=True)), + ('court_order_number', models.CharField(max_length=20, null=True)), + ('court_order_issue_date', models.DateField(default=django.utils.timezone.now, null=True)), + ('committing_court', models.CharField(max_length=100, null=True)), + ('placement_notes', models.CharField(max_length=1000, null=True)), + ('ob_number', models.CharField(max_length=20, null=True)), + ('placement_type', models.CharField(default='Normal', max_length=10)), + ('created_by', models.IntegerField(default=404, null=True)), + ('is_active', models.BooleanField(default=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_placement', + }, + ), + migrations.CreateModel( + name='OVCReminders', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('reminder_date', models.DateField(default=django.utils.timezone.now)), + ('reminder_type', models.CharField(max_length=100)), + ('reminder_description', models.CharField(max_length=1000)), + ('reminder_status', models.CharField(max_length=10)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_reminders', + }, + ), + migrations.CreateModel( + name='OVCReferrals', + fields=[ + ('referral_id', models.AutoField(primary_key=True, serialize=False)), + ('referral_date', models.DateField(default=django.utils.timezone.now)), + ('service', models.CharField(max_length=20)), + ('institution', models.CharField(max_length=50)), + ('contact_person', models.CharField(max_length=50)), + ('completed', models.BooleanField(default=False)), + ('outcome', models.CharField(max_length=255)), + ('is_void', models.BooleanField(default=False)), + ('date_of_event', models.DateField()), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_cp_referrals', + }, + ), + migrations.CreateModel( + name='OVCReferral', + fields=[ + ('refferal_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('refferal_actor_type', models.CharField(max_length=4)), + ('refferal_actor_specify', models.CharField(max_length=50)), + ('refferal_to', models.CharField(max_length=4)), + ('refferal_status', models.CharField(default='PENDING', max_length=20)), + ('refferal_startdate', models.DateField(default=datetime.date.today)), + ('refferal_enddate', models.DateField(null=True)), + ('referral_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_category', models.ForeignKey(default=uuid.uuid1, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccasecategory')), + ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_referrals', + }, + ), + migrations.CreateModel( + name='OVCPlacementFollowUp', + fields=[ + ('placememt_followup_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('followup_type', models.CharField(max_length=100)), + ('followup_date', models.DateField(default=django.utils.timezone.now)), + ('followup_details', models.CharField(blank=True, max_length=1000)), + ('followup_outcome', models.CharField(blank=True, max_length=1000)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('placement_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcplacement')), + ], + options={ + 'db_table': 'ovc_placement_followup', + }, + ), + migrations.CreateModel( + name='OVCNeeds', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('need_description', models.CharField(max_length=250)), + ('need_type', models.CharField(max_length=250)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_needs', + }, + ), + migrations.CreateModel( + name='OVCMonitoring', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('hiv_status_knowledge', models.CharField(max_length=5)), + ('viral_suppression', models.CharField(max_length=5)), + ('hiv_prevention', models.CharField(max_length=5)), + ('undernourished', models.CharField(max_length=5)), + ('access_money', models.CharField(max_length=5)), + ('violence', models.CharField(max_length=5)), + ('caregiver', models.CharField(max_length=5)), + ('school_attendance', models.CharField(max_length=5)), + ('school_progression', models.CharField(max_length=5)), + ('cp_achievement', models.CharField(max_length=5)), + ('case_closure', models.CharField(max_length=5)), + ('case_closure_checked', models.CharField(max_length=5)), + ('quarter', models.CharField(blank=True, max_length=10, null=True)), + ('is_void', models.BooleanField(default=False)), + ('event_date', models.DateField()), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('household', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ], + options={ + 'db_table': 'ovc_monitoring', + }, + ), + migrations.CreateModel( + name='OVCMedicalSubconditions', + fields=[ + ('medicalsubcond_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('medical_condition', models.CharField(max_length=50)), + ('medical_subcondition', models.CharField(max_length=50)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('medical_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcmedical')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_medical_subconditions', + }, + ), + migrations.CreateModel( + name='OVCHouseholdDemographics', + fields=[ + ('household_demographics_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('key', models.CharField(max_length=15)), + ('male', models.IntegerField(default=0)), + ('female', models.IntegerField(default=0)), + ('is_void', models.BooleanField(default=False)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('household', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ], + options={ + 'db_table': 'ovc_household_demographics', + }, + ), + migrations.CreateModel( + name='OVCHobbies', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('hobby', models.CharField(max_length=200)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_hobbies', + }, + ), + migrations.CreateModel( + name='OVCHivStatus', + fields=[ + ('hiv_status_id', models.AutoField(primary_key=True, serialize=False)), + ('hiv_status', models.CharField(max_length=10)), + ('is_void', models.BooleanField(default=False)), + ('date_of_event', models.DateField()), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_hiv_status', + }, + ), + migrations.CreateModel( + name='OVCHIVRiskScreening', + fields=[ + ('risk_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('test_done_when', models.BooleanField(null=True)), + ('test_donewhen_result', models.BooleanField(null=True)), + ('caregiver_know_status', models.BooleanField(null=True)), + ('caregiver_knowledge_yes', models.CharField(max_length=50, null=True)), + ('parent_PLWH', models.BooleanField(null=True)), + ('child_sick_malnourished', models.BooleanField(null=True)), + ('child_sexual_abuse', models.BooleanField(null=True)), + ('adol_sick', models.BooleanField(null=True)), + ('adol_sexual_abuse', models.BooleanField(null=True)), + ('sex', models.BooleanField(null=True)), + ('sti', models.BooleanField(null=True)), + ('hiv_test_required', models.BooleanField(null=True)), + ('parent_consent_testing', models.BooleanField(null=True)), + ('parent_consent_date', models.DateTimeField(default=django.utils.timezone.now, null=True)), + ('referral_made', models.BooleanField(null=True)), + ('referral_made_date', models.DateTimeField(default=django.utils.timezone.now, null=True)), + ('referral_completed', models.BooleanField(null=True)), + ('referral_completed_date', models.DateTimeField(default=django.utils.timezone.now, null=True)), + ('not_completed', models.CharField(max_length=50)), + ('test_result', models.CharField(max_length=20, null=True)), + ('art_referral', models.BooleanField(null=True)), + ('art_referral_date', models.DateTimeField(default=django.utils.timezone.now, null=True)), + ('art_referral_completed', models.BooleanField(null=True)), + ('art_referral_completed_date', models.DateTimeField(default=django.utils.timezone.now, null=True)), + ('facility_code', models.CharField(max_length=10, null=True)), + ('is_void', models.BooleanField(null=True)), + ('date_of_event', models.DateField(default=django.utils.timezone.now, null=True)), + ('timestamp_created', models.DateTimeField(auto_now_add=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_risk_screening', + }, + ), + migrations.CreateModel( + name='OVCHIVManagement', + fields=[ + ('adherence_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('hiv_confirmed_date', models.DateTimeField()), + ('treatment_initiated_date', models.DateTimeField()), + ('baseline_hei', models.CharField(max_length=100)), + ('firstline_start_date', models.DateTimeField()), + ('substitution_firstline_arv', models.BooleanField(default=False)), + ('substitution_firstline_date', models.DateTimeField(default=datetime.datetime(2022, 4, 30, 9, 26, 30, 589146))), + ('switch_secondline_arv', models.BooleanField(default=False)), + ('switch_secondline_date', models.DateTimeField(null=True)), + ('switch_thirdline_arv', models.BooleanField(default=False)), + ('switch_thirdline_date', models.DateTimeField(null=True)), + ('visit_date', models.DateTimeField()), + ('duration_art', models.CharField(max_length=3, null=True)), + ('height', models.CharField(max_length=3, null=True)), + ('muac', models.CharField(max_length=20, null=True)), + ('adherence', models.CharField(max_length=20)), + ('adherence_drugs_duration', models.CharField(max_length=3, null=True)), + ('adherence_counselling', models.CharField(max_length=20, null=True)), + ('treatment_suppoter', models.CharField(max_length=100, null=True)), + ('treatment_supporter_relationship', models.CharField(max_length=20, null=True)), + ('treatment_supporter_gender', models.CharField(max_length=11, null=True)), + ('treatment_supporter_age', models.CharField(max_length=11, null=True)), + ('treament_supporter_hiv', models.CharField(max_length=100, null=True)), + ('viral_load_results', models.CharField(max_length=7, null=True)), + ('viral_load_date', models.DateTimeField()), + ('detectable_viralload_interventions', models.CharField(max_length=50, null=True)), + ('disclosure', models.CharField(max_length=20, null=True)), + ('muac_score', models.CharField(max_length=20, null=True)), + ('bmi', models.CharField(max_length=20, null=True)), + ('nutritional_support', models.CharField(max_length=50, null=True)), + ('support_group_status', models.CharField(max_length=11, null=True)), + ('nhif_enrollment', models.BooleanField(default=False)), + ('support_group_enrollment', models.BooleanField(default=False)), + ('nhif_status', models.CharField(max_length=11, null=True)), + ('referral_services', models.CharField(max_length=100, null=True)), + ('nextappointment_date', models.DateField(null=True)), + ('peer_educator_name', models.CharField(max_length=100, null=True)), + ('peer_educator_contact', models.CharField(max_length=20, null=True)), + ('is_void', models.BooleanField(default=False)), + ('date_of_event', models.DateField()), + ('timestamp_created', models.DateTimeField(auto_now_add=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_hiv_management', + }, + ), + migrations.CreateModel( + name='OVCGokBursary', + fields=[ + ('application_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('sub_county', models.CharField(max_length=100, null=True)), + ('location', models.CharField(max_length=100, null=True)), + ('sub_location', models.CharField(max_length=100, null=True)), + ('village', models.CharField(max_length=100)), + ('nearest_school', models.CharField(max_length=100, null=True)), + ('nearest_worship', models.CharField(max_length=100, null=True)), + ('in_school', models.BooleanField(default=True)), + ('school_class', models.CharField(max_length=50)), + ('primary_school', models.CharField(max_length=150)), + ('school_marks', models.IntegerField()), + ('father_names', models.CharField(max_length=100)), + ('father_alive', models.BooleanField(default=True)), + ('father_telephone', models.CharField(max_length=20, null=True)), + ('mother_names', models.CharField(max_length=100)), + ('mother_alive', models.BooleanField(default=True)), + ('mother_telephone', models.CharField(max_length=20, null=True)), + ('guardian_names', models.CharField(max_length=100, null=True)), + ('guardian_telephone', models.CharField(max_length=20, null=True)), + ('guardian_relation', models.CharField(max_length=20, null=True)), + ('same_household', models.BooleanField(default=True)), + ('father_chronic_ill', models.BooleanField(default=True)), + ('father_chronic_illness', models.CharField(max_length=100, null=True)), + ('father_disabled', models.BooleanField(default=True)), + ('father_disability', models.CharField(max_length=100, null=True)), + ('father_pension', models.BooleanField(default=True)), + ('father_occupation', models.CharField(max_length=100, null=True)), + ('mother_chronic_ill', models.BooleanField(default=True)), + ('mother_chronic_illness', models.CharField(max_length=100, null=True)), + ('mother_disabled', models.BooleanField(default=True)), + ('mother_disability', models.CharField(max_length=100, null=True)), + ('mother_pension', models.BooleanField(default=True)), + ('mother_occupation', models.CharField(max_length=100, null=True)), + ('fees_amount', models.IntegerField()), + ('fees_balance', models.IntegerField()), + ('school_secondary', models.CharField(max_length=150)), + ('school_principal', models.CharField(max_length=150)), + ('school_sub_county', models.CharField(max_length=100, null=True)), + ('school_location', models.CharField(max_length=100, null=True)), + ('school_sub_location', models.CharField(max_length=100, null=True)), + ('school_village', models.CharField(max_length=100, null=True)), + ('school_telephone', models.CharField(max_length=20, null=True)), + ('school_email', models.CharField(max_length=100, null=True)), + ('school_type', models.CharField(max_length=5)), + ('school_category', models.CharField(max_length=5)), + ('school_enrolled', models.CharField(max_length=5)), + ('school_bank_branch', models.CharField(max_length=100)), + ('school_bank_account', models.CharField(max_length=50)), + ('school_recommend_by', models.CharField(max_length=5)), + ('school_recommend_date', models.DateField()), + ('chief_recommend_by', models.CharField(max_length=5)), + ('chief_recommend_date', models.DateField()), + ('chief_telephone', models.CharField(max_length=5)), + ('csac_approved', models.BooleanField(default=True)), + ('approved_amount', models.IntegerField()), + ('ssco_name', models.CharField(max_length=100)), + ('scco_signed', models.BooleanField(default=True)), + ('scco_sign_date', models.DateField()), + ('csac_chair_name', models.CharField(max_length=100)), + ('csac_signed', models.BooleanField(default=True)), + ('csac_sign_date', models.DateField()), + ('application_date', models.DateField()), + ('created_at', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('app_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('constituency', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='child_constituency', to='cpovc_main.setupgeography')), + ('county', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='child_county', to='cpovc_main.setupgeography')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('school_bank', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.listbanks')), + ('school_constituency', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='school_constituency', to='cpovc_main.setupgeography')), + ('school_county', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='school_county', to='cpovc_main.setupgeography')), + ], + options={ + 'verbose_name': 'GoK Bursary', + 'verbose_name_plural': 'GoK Bursaries', + 'db_table': 'bursary_application', + }, + ), + migrations.CreateModel( + name='OVCGoals', + fields=[ + ('goal_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('goal', models.CharField(max_length=255)), + ('action', models.CharField(max_length=255)), + ('is_void', models.BooleanField(default=False)), + ('date_of_event', models.DateField()), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_goals', + }, + ), + migrations.CreateModel( + name='OVCFriends', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('friend_firstname', models.CharField(max_length=50)), + ('friend_other_names', models.CharField(max_length=50)), + ('friend_surname', models.CharField(max_length=50)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_friends', + }, + ), + migrations.CreateModel( + name='OVCFMPEvaluation', + fields=[ + ('evaluation_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('assessment_type', models.CharField(max_length=20, null=True)), + ('Q_1', models.CharField(max_length=50, null=True)), + ('Q_2', models.CharField(max_length=50, null=True)), + ('Q_3', models.CharField(max_length=50, null=True)), + ('Q_4', models.CharField(max_length=50, null=True)), + ('Q_5', models.CharField(max_length=50, null=True)), + ('Q_6', models.CharField(max_length=50, null=True)), + ('Q_7', models.CharField(max_length=50, null=True)), + ('Q_8', models.CharField(max_length=50, null=True)), + ('Q_9', models.CharField(max_length=50, null=True)), + ('date_of_event', models.DateField(default=django.utils.timezone.now, null=True)), + ('timestamp_created', models.DateTimeField(auto_now_add=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_fmp_evaluation', + }, + ), + migrations.CreateModel( + name='OVCFamilyStatus', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('family_status', models.CharField(max_length=100)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_family_status', + }, + ), + migrations.CreateModel( + name='OVCFamilyCare', + fields=[ + ('familycare_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('type_of_care', models.CharField(max_length=4)), + ('certificate_number', models.CharField(max_length=20, null=True)), + ('date_of_certificate_expiry', models.DateField(null=True)), + ('type_of_adoption', models.CharField(max_length=4, null=True)), + ('adoption_country', models.CharField(max_length=20, null=True)), + ('date_of_adoption', models.DateField(default=django.utils.timezone.now, null=True)), + ('court_name', models.CharField(max_length=100, null=True)), + ('court_file_number', models.CharField(max_length=20, null=True)), + ('parental_status', models.CharField(max_length=4, null=True)), + ('contact_person', models.CharField(max_length=20, null=True)), + ('adopting_mother_firstname', models.CharField(max_length=20, null=True)), + ('adopting_mother_surname', models.CharField(max_length=20, null=True)), + ('adopting_mother_othernames', models.CharField(max_length=20, null=True)), + ('adopting_mother_idnumber', models.CharField(max_length=20, null=True)), + ('adopting_mother_contacts', models.CharField(max_length=20, null=True)), + ('adopting_father_firstname', models.CharField(max_length=20, null=True)), + ('adopting_father_surname', models.CharField(max_length=20, null=True)), + ('adopting_father_othernames', models.CharField(max_length=20, null=True)), + ('adopting_father_idnumber', models.CharField(max_length=20, null=True)), + ('adopting_father_contacts', models.CharField(max_length=20, null=True)), + ('adopting_agency', models.CharField(max_length=20, null=True)), + ('adoption_remarks', models.CharField(max_length=1000, null=True)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('adoption_subcounty', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adoption_subcounty_fk', to='cpovc_main.setupgeography')), + ('children_office', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children_office_fk', to='cpovc_registry.regorgunit')), + ('fostered_from', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='fostered_from_fk', to='cpovc_registry.regorgunit')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('residential_institution_name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='residential_institution_name_fk', to='cpovc_registry.regorgunit')), + ], + options={ + 'db_table': 'ovc_family_care', + }, + ), + migrations.CreateModel( + name='OVCExplanations', + fields=[ + ('explanation_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('comment', models.CharField(max_length=255)), + ('is_void', models.BooleanField(default=False)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareforms')), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccarequestions')), + ], + options={ + 'db_table': 'ovc_explanations', + }, + ), + migrations.CreateModel( + name='OVCEducationLevelFollowUp', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('admission_level', models.CharField(max_length=20, null=True)), + ('admission_sublevel', models.CharField(max_length=20, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('education_followup_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovceducationfollowup')), + ], + options={ + 'db_table': 'ovc_education_level_followup', + }, + ), + migrations.AddField( + model_name='ovceducationfollowup', + name='placement_id', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcplacement'), + ), + migrations.AddField( + model_name='ovceducationfollowup', + name='school_id', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.schoollist'), + ), + migrations.CreateModel( + name='OVCEconomicStatus', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('household_economic_status', models.CharField(max_length=100)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_economic_status', + }, + ), + migrations.CreateModel( + name='OVCDreams', + fields=[ + ('dreams_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('service_provided', models.CharField(max_length=250)), + ('service_provider', models.CharField(max_length=250, null=True)), + ('domain', models.CharField(max_length=10, null=True)), + ('place_of_service', models.CharField(max_length=250, null=True)), + ('date_of_encounter_event', models.DateField(default=django.utils.timezone.now)), + ('service_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_dreams', + }, + ), + migrations.CreateModel( + name='OVCDocuments', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('document_type', models.CharField(max_length=100)), + ('document_description', models.CharField(max_length=200)), + ('document_name', models.CharField(blank=True, max_length=100)), + ('document_dir', models.CharField(blank=True, max_length=1000)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_documents', + }, + ), + migrations.CreateModel( + name='OVCDischargeFollowUp', + fields=[ + ('discharge_followup_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('type_of_discharge', models.CharField(max_length=20)), + ('date_of_discharge', models.DateField(default=django.utils.timezone.now, null=True)), + ('discharge_destination', models.CharField(max_length=20, null=True)), + ('reason_of_discharge', models.CharField(blank=True, max_length=1000)), + ('expected_return_date', models.DateField(null=True)), + ('actual_return_date', models.DateField(null=True)), + ('discharge_comments', models.CharField(blank=True, max_length=1000)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('placement_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcplacement')), + ], + options={ + 'db_table': 'ovc_discharge_followup', + }, + ), + migrations.CreateModel( + name='OVCCaseSubCategory', + fields=[ + ('case_sub_category_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('case_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('sub_category_id', models.CharField(max_length=4)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccasecategory')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_case_sub_category', + }, + ), + migrations.CreateModel( + name='OvcCasePersons', + fields=[ + ('pid', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('person_relation', models.CharField(max_length=5, null=True)), + ('person_first_name', models.CharField(max_length=100, null=True)), + ('person_other_names', models.CharField(max_length=100, null=True)), + ('person_surname', models.CharField(max_length=100, null=True)), + ('person_type', models.CharField(default='PERP', max_length=5)), + ('person_identifier', models.CharField(max_length=15, null=True)), + ('person_dob', models.DateField(null=True)), + ('person_sex', models.CharField(choices=[('SMAL', 'Male'), ('SFEM', 'Female')], max_length=4, null=True)), + ('case', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'verbose_name': 'Case Other Person', + 'verbose_name_plural': 'Case Other Persons', + 'db_table': 'ovc_case_other_person', + }, + ), + migrations.CreateModel( + name='OVCCaseLocation', + fields=[ + ('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('report_location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sub_location', to='cpovc_main.setuplocation')), + ], + options={ + 'verbose_name': 'Case Area Location', + 'verbose_name_plural': 'Case Area Locations', + 'db_table': 'ovc_case_location', + }, + ), + migrations.CreateModel( + name='OvcCaseInformation', + fields=[ + ('info_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('info_type', models.CharField(default='INFO', max_length=5)), + ('info_item', models.CharField(max_length=6, null=True)), + ('info_detail', models.TextField(null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('case', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('person', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'verbose_name': 'Case Information', + 'verbose_name_plural': 'Case Information', + 'db_table': 'ovc_case_info', + }, + ), + migrations.CreateModel( + name='OVCCaseGeo', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('report_ward', models.CharField(max_length=100, null=True)), + ('report_village', models.CharField(max_length=100, null=True)), + ('occurence_ward', models.CharField(blank=True, max_length=100)), + ('occurence_village', models.CharField(blank=True, max_length=100)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord')), + ('occurence_county', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='occurence_county_fk', to='cpovc_main.setupgeography')), + ('occurence_subcounty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='occurence_subcounty_fk', to='cpovc_main.setupgeography')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('report_orgunit', models.ForeignKey(max_length=10, null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regorgunit')), + ('report_subcounty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='report_subcounty_fk', to='cpovc_main.setupgeography')), + ], + options={ + 'db_table': 'ovc_case_geo', + }, + ), + migrations.CreateModel( + name='OVCCaseEventSummon', + fields=[ + ('summon_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('honoured', models.BooleanField(default=False)), + ('honoured_date', models.DateField(null=True)), + ('summon_date', models.DateField(null=True)), + ('summon_note', models.CharField(max_length=250, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_category', models.ForeignKey(default=uuid.uuid1, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccasecategory')), + ('case_event_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaseevents')), + ], + options={ + 'db_table': 'ovc_case_event_summon', + }, + ), + migrations.CreateModel( + name='OVCCaseEventServices', + fields=[ + ('service_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('service_provided', models.CharField(max_length=250)), + ('service_provider', models.CharField(max_length=250, null=True)), + ('place_of_service', models.CharField(max_length=250, null=True)), + ('date_of_encounter_event', models.DateField(default=django.utils.timezone.now)), + ('service_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_category', models.ForeignKey(blank=True, default=uuid.uuid1, editable=False, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccasecategory')), + ('case_event_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaseevents')), + ], + options={ + 'db_table': 'ovc_case_event_encounters', + }, + ), + migrations.AddField( + model_name='ovccaseevents', + name='case_id', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord'), + ), + migrations.AddField( + model_name='ovccaseevents', + name='placement_id', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcplacement'), + ), + migrations.CreateModel( + name='OVCCaseEventCourt', + fields=[ + ('court_session_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('court_order', models.CharField(max_length=250, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_category', models.ForeignKey(blank=True, default=uuid.uuid1, editable=False, on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccasecategory')), + ('case_event_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaseevents')), + ], + options={ + 'db_table': 'ovc_case_event_court', + }, + ), + migrations.CreateModel( + name='OVCCaseEventClosure', + fields=[ + ('closure_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('case_outcome', models.CharField(max_length=4)), + ('date_of_case_closure', models.DateField(default=django.utils.timezone.now)), + ('case_closure_notes', models.CharField(max_length=1000)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('is_active', models.BooleanField(default=True)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('case_event_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaseevents')), + ('transfer_to', models.ForeignKey(max_length=10, null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regorgunit')), + ], + options={ + 'db_table': 'ovc_case_event_closure', + }, + ), + migrations.AddField( + model_name='ovccasecategory', + name='case_id', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccaserecord'), + ), + migrations.AddField( + model_name='ovccasecategory', + name='person', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson'), + ), + migrations.CreateModel( + name='OVCCareWellbeing', + fields=[ + ('well_being_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('question_code', models.CharField(blank=True, max_length=10)), + ('answer', models.CharField(max_length=250)), + ('question_type', models.CharField(max_length=5)), + ('domain', models.CharField(max_length=100)), + ('is_void', models.BooleanField(default=False)), + ('date_of_event', models.DateField()), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('household', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccarequestions')), + ], + options={ + 'db_table': 'ovc_care_well_being', + }, + ), + migrations.CreateModel( + name='OVCCareServices', + fields=[ + ('service_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('service_provided', models.CharField(max_length=250)), + ('service_provider', models.CharField(max_length=250, null=True)), + ('domain', models.CharField(max_length=4, null=True)), + ('place_of_service', models.CharField(max_length=250, null=True)), + ('date_of_encounter_event', models.DateField(default=django.utils.timezone.now, null=True)), + ('service_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ], + options={ + 'db_table': 'ovc_care_services', + }, + ), + migrations.CreateModel( + name='OVCCarePriority', + fields=[ + ('priority_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('domain', models.CharField(max_length=4)), + ('service', models.CharField(max_length=4)), + ('service_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ], + options={ + 'db_table': 'ovc_care_priority', + }, + ), + migrations.CreateModel( + name='OVCCareF1B', + fields=[ + ('form_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('domain', models.CharField(max_length=5)), + ('entity', models.CharField(max_length=5)), + ('value', models.SmallIntegerField(default=1)), + ('is_void', models.BooleanField(default=False)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ], + options={ + 'db_table': 'ovc_care_f1b', + }, + ), + migrations.CreateModel( + name='OVCCareEAV', + fields=[ + ('eav_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('entity', models.CharField(max_length=5)), + ('attribute', models.CharField(max_length=5)), + ('value', models.CharField(max_length=25)), + ('value_for', models.CharField(max_length=10, null=True)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ], + options={ + 'db_table': 'ovc_care_eav', + }, + ), + migrations.CreateModel( + name='OVCCareCpara', + fields=[ + ('cpara_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('question_code', models.CharField(blank=True, max_length=10)), + ('answer', models.CharField(max_length=15)), + ('question_type', models.CharField(max_length=50)), + ('domain', models.CharField(max_length=50)), + ('date_of_event', models.DateField()), + ('date_of_previous_event', models.DateField(blank=True, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('caregiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cpara_caregiver', to='cpovc_registry.regperson')), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('household', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccarequestions')), + ], + options={ + 'db_table': 'ovc_care_cpara', + }, + ), + migrations.CreateModel( + name='OVCCareCasePlan', + fields=[ + ('case_plan_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('domain', models.CharField(max_length=50)), + ('goal', models.CharField(max_length=255)), + ('need', models.CharField(max_length=255)), + ('priority', models.CharField(max_length=255)), + ('cp_service', models.CharField(max_length=10)), + ('responsible', models.CharField(max_length=50)), + ('completion_date', models.DateField(default=django.utils.timezone.now)), + ('actual_completion_date', models.DateField(default=django.utils.timezone.now)), + ('results', models.CharField(max_length=300)), + ('reasons', models.CharField(max_length=300)), + ('date_of_event', models.DateField()), + ('date_of_previous_event', models.DateField(blank=True, null=True)), + ('case_plan_status', models.CharField(max_length=5)), + ('initial_caseplan', models.BooleanField(default=True)), + ('is_void', models.BooleanField(default=False)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('caregiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='caseplan_caregiver', to='cpovc_registry.regperson')), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareforms')), + ('household', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_care_case_plan', + }, + ), + migrations.CreateModel( + name='OVCCareBenchmarkScore', + fields=[ + ('bench_mark_score_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('bench_mark_1', models.IntegerField(default=0)), + ('bench_mark_2', models.IntegerField(default=0)), + ('bench_mark_3', models.IntegerField(default=0)), + ('bench_mark_4', models.IntegerField(default=0)), + ('bench_mark_5', models.IntegerField(default=0)), + ('bench_mark_6', models.IntegerField(default=0)), + ('bench_mark_7', models.IntegerField(default=0)), + ('bench_mark_8', models.IntegerField(default=0)), + ('bench_mark_9', models.IntegerField(default=0)), + ('bench_mark_10', models.IntegerField(default=0)), + ('bench_mark_11', models.IntegerField(default=0)), + ('bench_mark_12', models.IntegerField(default=0)), + ('bench_mark_13', models.IntegerField(default=0)), + ('bench_mark_14', models.IntegerField(default=0)), + ('bench_mark_15', models.IntegerField(default=0)), + ('bench_mark_16', models.IntegerField(default=0)), + ('bench_mark_17', models.IntegerField(default=0)), + ('score', models.IntegerField(default=0)), + ('is_void', models.BooleanField(default=False)), + ('date_of_event', models.DateField(default=django.utils.timezone.now)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('care_giver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('household', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ], + options={ + 'db_table': 'ovc_care_benchmark_score', + }, + ), + migrations.CreateModel( + name='OVCCareAssessment', + fields=[ + ('assessment_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('domain', models.CharField(max_length=4)), + ('service', models.CharField(max_length=4)), + ('service_status', models.CharField(max_length=7)), + ('service_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ], + options={ + 'db_table': 'ovc_care_assessment', + }, + ), + migrations.CreateModel( + name='OVCBursary', + fields=[ + ('bursary_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('bursary_type', models.CharField(max_length=4, null=True)), + ('disbursement_date', models.DateField(default=django.utils.timezone.now, null=True)), + ('amount', models.CharField(max_length=20, null=True)), + ('year', models.CharField(max_length=20, null=True)), + ('term', models.CharField(max_length=20, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('is_active', models.BooleanField(default=True)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('created_by', models.IntegerField(default=404, null=True)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_bursaryinfo', + }, + ), + migrations.CreateModel( + name='OVCAdverseEventsOtherFollowUp', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('adverse_condition', models.CharField(max_length=20)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('adverse_condition_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcadverseeventsfollowup')), + ], + options={ + 'db_table': 'ovc_adverseevents_other_followup', + }, + ), + migrations.AddField( + model_name='ovcadverseeventsfollowup', + name='placement_id', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcplacement'), + ), + migrations.CreateModel( + name='NewGraduationMonitoring', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('month_id', models.IntegerField(max_length=3)), + ('bench_mark_1', models.IntegerField(default=0)), + ('bench_mark_2', models.IntegerField(default=0)), + ('bench_mark_3', models.IntegerField(default=0)), + ('bench_mark_4', models.IntegerField(default=0)), + ('bench_mark_5', models.IntegerField(default=0)), + ('bench_mark_6', models.IntegerField(default=0)), + ('bench_mark_7', models.IntegerField(default=0)), + ('bench_mark_8', models.IntegerField(default=0)), + ('bench_mark_9', models.IntegerField(default=0)), + ('date_of_event', models.DateField(default=django.utils.timezone.now)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True)), + ('care_giver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovccareevents')), + ('household', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ], + options={ + 'db_table': 'new_graduation_monitoring', + }, + ), + migrations.CreateModel( + name='FormsLog', + fields=[ + ('form_log_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('form_type_id', models.CharField(max_length=250)), + ('form_id', models.CharField(default='XXXX', max_length=50)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('timestamp_modified', models.DateTimeField(auto_now=True)), + ('app_user', models.IntegerField(default=404, null=True)), + ('person', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'forms_log', + }, + ), + migrations.CreateModel( + name='FormsAuditTrail', + fields=[ + ('transaction_id', models.AutoField(primary_key=True, serialize=False)), + ('form_id', models.UUIDField(null=True)), + ('form_type_id', models.CharField(max_length=250)), + ('transaction_type_id', models.CharField(db_index=True, max_length=4, null=True)), + ('interface_id', models.CharField(db_index=True, max_length=4, null=True)), + ('timestamp_modified', models.DateTimeField(auto_now=True)), + ('ip_address', models.GenericIPAddressField()), + ('meta_data', models.TextField(null=True)), + ('app_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'db_table': 'forms_audit_trail', + }, + ), + ] diff --git a/cpovc_forms/migrations/0002_ovcpreventiveevents_and_more.py b/cpovc_forms/migrations/0002_ovcpreventiveevents_and_more.py new file mode 100644 index 000000000..b8d380bb1 --- /dev/null +++ b/cpovc_forms/migrations/0002_ovcpreventiveevents_and_more.py @@ -0,0 +1,109 @@ +# Generated by Django 4.0.2 on 2022-04-30 16:55 + +import datetime +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import django.utils.timezone +import uuid + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_registry', '__first__'), + ('cpovc_ovc', '__first__'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('cpovc_forms', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='OVCPreventiveEvents', + fields=[ + ('event', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('event_type_id', models.CharField(max_length=20)), + ('event_counter', models.IntegerField(default=0)), + ('event_score', models.IntegerField(default=0, null=True)), + ('date_of_event', models.DateField(default=django.utils.timezone.now)), + ('date_of_previous_event', models.DateTimeField(null=True)), + ('created_by', models.IntegerField(default=404, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('app_user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('house_hold', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_ovc.ovchousehold')), + ('person', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_preventive_events', + }, + ), + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 4, 30, 19, 55, 46, 473024)), + ), + migrations.CreateModel( + name='OVCPrevSinovyoCaregiverEvaluation', + fields=[ + ('evaluation_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('type_of_assessment', models.CharField(max_length=40)), + ('date_of_assessment', models.DateTimeField()), + ('bd_age', models.CharField(max_length=40)), + ('bd_sex', models.CharField(max_length=40)), + ('bd_read', models.CharField(max_length=40)), + ('bd_education_level', models.CharField(max_length=40)), + ('bd_biological_children', models.CharField(max_length=40)), + ('bd_non_biological_children', models.CharField(max_length=40)), + ('bd_children_not_in_school', models.CharField(max_length=40)), + ('watch_tv_with_child', models.CharField(max_length=40)), + ('bd_source_income', models.CharField(max_length=40)), + ('bd_adults_contribute_hh_income', models.CharField(max_length=40)), + ('bd_children_contribute_hh_income', models.CharField(max_length=40)), + ('bd_biological_mother', models.CharField(max_length=40)), + ('bd_bm_live_hh', models.CharField(max_length=40, null=True)), + ('bd_biological_father', models.CharField(max_length=40)), + ('bd_bf_live_hh', models.CharField(max_length=40, null=True)), + ('bd_money_basic_expenses', models.CharField(max_length=40)), + ('bd_violence', models.CharField(max_length=40)), + ('bd_adult_unwell', models.CharField(max_length=40)), + ('bad_things_from_sex', models.CharField(max_length=40)), + ('bd_child_unwell', models.CharField(max_length=40)), + ('bd_miss_school', models.CharField(max_length=40)), + ('bd_hiv_status', models.CharField(max_length=40)), + ('bd_children_hiv_status', models.CharField(max_length=40)), + ('bd_hiv_prevention', models.CharField(max_length=40)), + ('bd_two_meals', models.CharField(max_length=40)), + ('bd_missing_meal', models.CharField(max_length=40)), + ('rc_discuss_child_needs', models.CharField(max_length=40)), + ('rc_discipline', models.CharField(max_length=40)), + ('rc_tells_bothering', models.CharField(max_length=40)), + ('rc_involve_decisions', models.CharField(max_length=40)), + ('cb_child_obedient', models.CharField(max_length=40)), + ('cb_figths_children', models.CharField(max_length=40)), + ('dc_often_discipline', models.CharField(max_length=40)), + ('dc_physical_discipline', models.CharField(max_length=40)), + ('dc_upstet_child', models.CharField(max_length=40)), + ('sp_caring_energy', models.CharField(max_length=40)), + ('sp_source_stress', models.CharField(max_length=40)), + ('sp_physical_punish', models.CharField(max_length=40)), + ('fs_depressed', models.CharField(max_length=80)), + ('fs_effort', models.CharField(max_length=80)), + ('fs_hopeful', models.CharField(max_length=80)), + ('fi_money_important_items', models.CharField(max_length=40)), + ('fi_worried_money', models.CharField(max_length=40)), + ('fmp_pre_grouping_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(default=django.utils.timezone.now)), + ('is_void', models.BooleanField(default=False)), + ('sync_id', models.UUIDField(default=uuid.uuid1, editable=False)), + ('event', models.ForeignKey(default='15657fa6-c860-11ec-b9d4-00e18c9fac49', on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcpreventiveevents')), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ('ref_caregiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='preval_caregiver', to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'ovc_prev_sinovuyo_caregiver_evaluation', + }, + ), + ] diff --git a/cpovc_forms/migrations/0003_alter_ovchivmanagement_substitution_firstline_date.py b/cpovc_forms/migrations/0003_alter_ovchivmanagement_substitution_firstline_date.py new file mode 100644 index 000000000..420b6e140 --- /dev/null +++ b/cpovc_forms/migrations/0003_alter_ovchivmanagement_substitution_firstline_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.2 on 2022-04-30 17:00 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0002_ovcpreventiveevents_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 4, 30, 20, 0, 16, 10684)), + ), + ] diff --git a/cpovc_forms/migrations/0004_remove_ovcprevsinovyocaregiverevaluation_bad_things_from_sex_and_more.py b/cpovc_forms/migrations/0004_remove_ovcprevsinovyocaregiverevaluation_bad_things_from_sex_and_more.py new file mode 100644 index 000000000..729c53467 --- /dev/null +++ b/cpovc_forms/migrations/0004_remove_ovcprevsinovyocaregiverevaluation_bad_things_from_sex_and_more.py @@ -0,0 +1,33 @@ +# Generated by Django 4.0.2 on 2022-05-02 18:52 + +import datetime +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0003_alter_ovchivmanagement_substitution_firstline_date'), + ] + + operations = [ + migrations.RemoveField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bad_things_from_sex', + ), + migrations.RemoveField( + model_name='ovcprevsinovyocaregiverevaluation', + name='watch_tv_with_child', + ), + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 5, 2, 21, 52, 18, 858136)), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='event', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_forms.ovcpreventiveevents'), + ), + ] diff --git a/cpovc_forms/migrations/0005_alter_ovchivmanagement_substitution_firstline_date_and_more.py b/cpovc_forms/migrations/0005_alter_ovchivmanagement_substitution_firstline_date_and_more.py new file mode 100644 index 000000000..2b2cfe041 --- /dev/null +++ b/cpovc_forms/migrations/0005_alter_ovchivmanagement_substitution_firstline_date_and_more.py @@ -0,0 +1,234 @@ +# Generated by Django 4.0.2 on 2022-05-03 14:27 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0004_remove_ovcprevsinovyocaregiverevaluation_bad_things_from_sex_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 5, 3, 17, 27, 25, 860726)), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_adult_unwell', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_adults_contribute_hh_income', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_age', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_bf_live_hh', + field=models.CharField(max_length=10, null=True), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_biological_children', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_biological_father', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_biological_mother', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_bm_live_hh', + field=models.CharField(max_length=10, null=True), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_child_unwell', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_children_contribute_hh_income', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_children_hiv_status', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_children_not_in_school', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_education_level', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_hiv_prevention', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_hiv_status', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_miss_school', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_missing_meal', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_money_basic_expenses', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_non_biological_children', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_read', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_sex', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_source_income', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_two_meals', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='bd_violence', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='cb_child_obedient', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='cb_figths_children', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='date_of_assessment', + field=models.DateField(), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='dc_often_discipline', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='dc_physical_discipline', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='dc_upstet_child', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='fi_money_important_items', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='fi_worried_money', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='fs_depressed', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='fs_effort', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='fs_hopeful', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='rc_discipline', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='rc_discuss_child_needs', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='rc_involve_decisions', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='rc_tells_bothering', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='sp_caring_energy', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='sp_physical_punish', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='sp_source_stress', + field=models.CharField(max_length=10), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='type_of_assessment', + field=models.CharField(max_length=10), + ), + ] diff --git a/cpovc_forms/migrations/0006_alter_ovchivmanagement_substitution_firstline_date.py b/cpovc_forms/migrations/0006_alter_ovchivmanagement_substitution_firstline_date.py new file mode 100644 index 000000000..dd255534b --- /dev/null +++ b/cpovc_forms/migrations/0006_alter_ovchivmanagement_substitution_firstline_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.2 on 2022-05-03 14:28 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0005_alter_ovchivmanagement_substitution_firstline_date_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 5, 3, 17, 28, 36, 712856)), + ), + ] diff --git a/cpovc_forms/migrations/0007_alter_ovchivmanagement_substitution_firstline_date.py b/cpovc_forms/migrations/0007_alter_ovchivmanagement_substitution_firstline_date.py new file mode 100644 index 000000000..68fb80c8f --- /dev/null +++ b/cpovc_forms/migrations/0007_alter_ovchivmanagement_substitution_firstline_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.2 on 2022-05-03 14:30 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0006_alter_ovchivmanagement_substitution_firstline_date'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 5, 3, 17, 30, 6, 435301)), + ), + ] diff --git a/cpovc_forms/migrations/0008_alter_ovchivmanagement_substitution_firstline_date_and_more.py b/cpovc_forms/migrations/0008_alter_ovchivmanagement_substitution_firstline_date_and_more.py new file mode 100644 index 000000000..1948fbb96 --- /dev/null +++ b/cpovc_forms/migrations/0008_alter_ovchivmanagement_substitution_firstline_date_and_more.py @@ -0,0 +1,24 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:19 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0007_alter_ovchivmanagement_substitution_firstline_date'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 5, 5, 19, 19, 7, 600583)), + ), + migrations.AlterField( + model_name='ovcprevsinovyocaregiverevaluation', + name='date_of_assessment', + field=models.DateTimeField(), + ), + ] diff --git a/cpovc_forms/migrations/0009_alter_ovchivmanagement_substitution_firstline_date.py b/cpovc_forms/migrations/0009_alter_ovchivmanagement_substitution_firstline_date.py new file mode 100644 index 000000000..772b78fd7 --- /dev/null +++ b/cpovc_forms/migrations/0009_alter_ovchivmanagement_substitution_firstline_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:25 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0008_alter_ovchivmanagement_substitution_firstline_date_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 5, 5, 19, 25, 20, 217776)), + ), + ] diff --git a/cpovc_forms/migrations/0010_alter_ovchivmanagement_substitution_firstline_date.py b/cpovc_forms/migrations/0010_alter_ovchivmanagement_substitution_firstline_date.py new file mode 100644 index 000000000..6ccc054d6 --- /dev/null +++ b/cpovc_forms/migrations/0010_alter_ovchivmanagement_substitution_firstline_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:26 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0009_alter_ovchivmanagement_substitution_firstline_date'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 5, 5, 19, 26, 22, 487464)), + ), + ] diff --git a/cpovc_forms/migrations/0011_alter_ovchivmanagement_substitution_firstline_date.py b/cpovc_forms/migrations/0011_alter_ovchivmanagement_substitution_firstline_date.py new file mode 100644 index 000000000..7dccd3d41 --- /dev/null +++ b/cpovc_forms/migrations/0011_alter_ovchivmanagement_substitution_firstline_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:27 + +import datetime +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0010_alter_ovchivmanagement_substitution_firstline_date'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=datetime.datetime(2022, 5, 5, 19, 26, 59, 586476)), + ), + ] diff --git a/cpovc_forms/migrations/0012_alter_ovchivmanagement_substitution_firstline_date.py b/cpovc_forms/migrations/0012_alter_ovchivmanagement_substitution_firstline_date.py new file mode 100644 index 000000000..ba40f3678 --- /dev/null +++ b/cpovc_forms/migrations/0012_alter_ovchivmanagement_substitution_firstline_date.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:34 + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_forms', '0011_alter_ovchivmanagement_substitution_firstline_date'), + ] + + operations = [ + migrations.AlterField( + model_name='ovchivmanagement', + name='substitution_firstline_date', + field=models.DateTimeField(default=django.utils.timezone.now), + ), + ] diff --git a/cpovc_forms/migrations/__pycache__/0001_initial.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 000000000..df13ca1c9 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0002_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0002_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..a90a26866 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0002_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0002_ovcpreventiveevents_and_more.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0002_ovcpreventiveevents_and_more.cpython-39.pyc new file mode 100644 index 000000000..1f18adb78 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0002_ovcpreventiveevents_and_more.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0003_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0003_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..601e4233b Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0003_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0003_ovcpreventiveevents_and_more.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0003_ovcpreventiveevents_and_more.cpython-39.pyc new file mode 100644 index 000000000..0c8c478ac Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0003_ovcpreventiveevents_and_more.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0004_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0004_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc new file mode 100644 index 000000000..52a73ade5 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0004_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0004_remove_ovcprevsinovyocaregiverevaluation_bad_things_from_sex_and_more.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0004_remove_ovcprevsinovyocaregiverevaluation_bad_things_from_sex_and_more.cpython-39.pyc new file mode 100644 index 000000000..a88dd7111 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0004_remove_ovcprevsinovyocaregiverevaluation_bad_things_from_sex_and_more.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0005_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0005_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc new file mode 100644 index 000000000..1911a4298 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0005_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0006_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0006_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..fdf388a63 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0006_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0006_ovcprevsinovyocaregiverevaluation_date_of_assessment_and_more.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0006_ovcprevsinovyocaregiverevaluation_date_of_assessment_and_more.cpython-39.pyc new file mode 100644 index 000000000..219e02803 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0006_ovcprevsinovyocaregiverevaluation_date_of_assessment_and_more.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0007_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0007_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..27fc8b2e9 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0007_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0008_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0008_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..7e49d7d53 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0008_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0008_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0008_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc new file mode 100644 index 000000000..2ede5b4ad Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0008_alter_ovchivmanagement_substitution_firstline_date_and_more.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0009_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0009_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..5d045e62d Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0009_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0010_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0010_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..40839a647 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0010_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0011_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0011_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..ce796f2c2 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0011_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/0012_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/0012_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc new file mode 100644 index 000000000..35c55c307 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/0012_alter_ovchivmanagement_substitution_firstline_date.cpython-39.pyc differ diff --git a/cpovc_forms/migrations/__pycache__/__init__.cpython-39.pyc b/cpovc_forms/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..0029222d2 Binary files /dev/null and b/cpovc_forms/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/cpovc_forms/models.py b/cpovc_forms/models.py index d0438d0d8..c67c6b0af 100644 --- a/cpovc_forms/models.py +++ b/cpovc_forms/models.py @@ -1,10 +1,11 @@ from django.db import models from django.utils import timezone +from datetime import timedelta import datetime import uuid from cpovc_registry.models import (RegPerson, RegOrgUnit, AppUser) from cpovc_main.models import (SchoolList, SetupLocation) -from cpovc_ovc.models import (OVCHouseHold, OVCFacility) +from cpovc_ovc.models import (OVCHouseHold, OVCFacility,) # Create your models here. @@ -1397,104 +1398,104 @@ def __unicode__(self): return str(self.dreams_id) -class OVCBasicCRS(models.Model): - # Make case_id primary key - case_id = models.UUIDField( - primary_key=True, default=uuid.uuid1) - case_serial = models.CharField(max_length=50, default='XXXX') - case_reporter = models.CharField(max_length=5) - reporter_telephone = models.CharField(max_length=15, null=True) - reporter_county = models.CharField(max_length=3, null=True) - reporter_sub_county = models.CharField(max_length=3, null=True) - reporter_ward = models.CharField(max_length=100, null=True) - reporter_village = models.CharField(max_length=100, null=True) - case_date = models.DateField(default=timezone.now) - perpetrator = models.CharField(max_length=5, null=True) - county = models.CharField(max_length=3) - constituency = models.CharField(max_length=3) - organization_unit = models.CharField(max_length=100) - case_landmark = models.CharField(max_length=50, null=True) - hh_economic_status = models.CharField(max_length=5) - family_status = models.CharField(max_length=5) - mental_condition = models.CharField(max_length=5) - physical_condition = models.CharField(max_length=5) - other_condition = models.CharField(max_length=5) - risk_level = models.CharField(max_length=5) - referral = models.CharField(max_length=5, default='ANNO') - referral_detail = models.CharField(max_length=200, null=True) - summon = models.CharField(max_length=5, default='ANNO') - case_narration = models.TextField(null=True) - longitude = models.DecimalField(max_digits=10, decimal_places=7, null=True) - latitude = models.DecimalField(max_digits=10, decimal_places=7, null=True) - account = models.ForeignKey(AppUser, on_delete=models.CASCADE, default=1) - case_params = models.TextField(null=True) - status = models.IntegerField(default=0) - case_comments = models.TextField(null=True) - case_record = models.ForeignKey( - OVCCaseRecord, blank=True, null=True, on_delete=models.CASCADE) - case_org_unit = models.ForeignKey( - RegOrgUnit, blank=True, null=True, on_delete=models.CASCADE) - timestamp_created = models.DateTimeField(default=timezone.now) - is_void = models.BooleanField(default=False) - - class Meta: - db_table = 'ovc_basic_case_record' - verbose_name = 'Basic Case Record' - verbose_name_plural = 'Basic Case Records' - - def __unicode__(self): - """To be returned by admin actions.""" - return '%s' % (self.case_serial) - - -class OVCBasicPerson(models.Model): - # Make case_id primary key - person_id = models.UUIDField( - primary_key=True, default=uuid.uuid1, editable=False) - relationship = models.CharField(max_length=5, null=True) - person_type = models.CharField( - max_length=5, choices=( - ('PTRD', 'Reporter'), ('PTPD', 'Perpetrator'), - ('PTCH', 'Child'), ('PTCG', 'Guardian'))) - first_name = models.CharField(max_length=50) - surname = models.CharField(max_length=50) - other_names = models.CharField(max_length=50, null=True) - dob = models.DateField(null=True) - sex = models.CharField(max_length=5, null=True) - case = models.ForeignKey(OVCBasicCRS, on_delete=models.CASCADE) - is_void = models.BooleanField(default=False) - - class Meta: - db_table = 'ovc_basic_person' - verbose_name = 'Basic Person' - verbose_name_plural = 'Basic Persons' - - def __unicode__(self): - """To be returned by admin actions.""" - return '%s - %s %s' % ( - self.get_person_type_display(), self.first_name, self.surname) - - -class OVCBasicCategory(models.Model): - # Make case_id primary key - category_id = models.UUIDField( - primary_key=True, default=uuid.uuid1, editable=False) - case_category = models.CharField(max_length=5) - case_sub_category = models.CharField(max_length=5, null=True) - case_date_event = models.DateField(default=timezone.now) - case_nature = models.CharField(max_length=5) - case_place_of_event = models.CharField(max_length=5) - case = models.ForeignKey(OVCBasicCRS, on_delete=models.CASCADE) - is_void = models.BooleanField(default=False) - - class Meta: - db_table = 'ovc_basic_category' - verbose_name = 'Basic Category' - verbose_name_plural = 'Basic Category' - - def __unicode__(self): - """To be returned by admin actions.""" - return '%s' % (self.case_category) +# class OVCBasicCRS(models.Model): +# # Make case_id primary key +# case_id = models.UUIDField( +# primary_key=True, default=uuid.uuid1) +# case_serial = models.CharField(max_length=50, default='XXXX') +# case_reporter = models.CharField(max_length=5) +# reporter_telephone = models.CharField(max_length=15, null=True) +# reporter_county = models.CharField(max_length=3, null=True) +# reporter_sub_county = models.CharField(max_length=3, null=True) +# reporter_ward = models.CharField(max_length=100, null=True) +# reporter_village = models.CharField(max_length=100, null=True) +# case_date = models.DateField(default=timezone.now) +# perpetrator = models.CharField(max_length=5, null=True) +# county = models.CharField(max_length=3) +# constituency = models.CharField(max_length=3) +# organization_unit = models.CharField(max_length=100) +# case_landmark = models.CharField(max_length=50, null=True) +# hh_economic_status = models.CharField(max_length=5) +# family_status = models.CharField(max_length=5) +# mental_condition = models.CharField(max_length=5) +# physical_condition = models.CharField(max_length=5) +# other_condition = models.CharField(max_length=5) +# risk_level = models.CharField(max_length=5) +# referral = models.CharField(max_length=5, default='ANNO') +# referral_detail = models.CharField(max_length=200, null=True) +# summon = models.CharField(max_length=5, default='ANNO') +# case_narration = models.TextField(null=True) +# longitude = models.DecimalField(max_digits=10, decimal_places=7, null=True) +# latitude = models.DecimalField(max_digits=10, decimal_places=7, null=True) +# account = models.ForeignKey(AppUser, on_delete=models.CASCADE, default=1) +# case_params = models.TextField(null=True) +# status = models.IntegerField(default=0) +# case_comments = models.TextField(null=True) +# case_record = models.ForeignKey( +# OVCCaseRecord, blank=True, null=True, on_delete=models.CASCADE) +# case_org_unit = models.ForeignKey( +# RegOrgUnit, blank=True, null=True, on_delete=models.CASCADE) +# timestamp_created = models.DateTimeField(default=timezone.now) +# is_void = models.BooleanField(default=False) +# +# class Meta: +# db_table = 'ovc_basic_case_record' +# verbose_name = 'Basic Case Record' +# verbose_name_plural = 'Basic Case Records' +# +# def __unicode__(self): +# """To be returned by admin actions.""" +# return '%s' % (self.case_serial) +# +# +# class OVCBasicPerson(models.Model): +# # Make case_id primary key +# person_id = models.UUIDField( +# primary_key=True, default=uuid.uuid1, editable=False) +# relationship = models.CharField(max_length=5, null=True) +# person_type = models.CharField( +# max_length=5, choices=( +# ('PTRD', 'Reporter'), ('PTPD', 'Perpetrator'), +# ('PTCH', 'Child'), ('PTCG', 'Guardian'))) +# first_name = models.CharField(max_length=50) +# surname = models.CharField(max_length=50) +# other_names = models.CharField(max_length=50, null=True) +# dob = models.DateField(null=True) +# sex = models.CharField(max_length=5, null=True) +# case = models.ForeignKey(OVCBasicCRS, on_delete=models.CASCADE) +# is_void = models.BooleanField(default=False) +# +# class Meta: +# db_table = 'ovc_basic_person' +# verbose_name = 'Basic Person' +# verbose_name_plural = 'Basic Persons' +# +# def __unicode__(self): +# """To be returned by admin actions.""" +# return '%s - %s %s' % ( +# self.get_person_type_display(), self.first_name, self.surname) +# +# +# class OVCBasicCategory(models.Model): +# # Make case_id primary key +# category_id = models.UUIDField( +# primary_key=True, default=uuid.uuid1, editable=False) +# case_category = models.CharField(max_length=5) +# case_sub_category = models.CharField(max_length=5, null=True) +# case_date_event = models.DateField(default=timezone.now) +# case_nature = models.CharField(max_length=5) +# case_place_of_event = models.CharField(max_length=5) +# case = models.ForeignKey(OVCBasicCRS, on_delete=models.CASCADE) +# is_void = models.BooleanField(default=False) +# +# class Meta: +# db_table = 'ovc_basic_category' +# verbose_name = 'Basic Category' +# verbose_name_plural = 'Basic Category' +# +# def __unicode__(self): +# """To be returned by admin actions.""" +# return '%s' % (self.case_category) class OvcCasePersons(models.Model): @@ -1566,3 +1567,137 @@ class Meta: def __unicode__(self): """To be returned by admin actions.""" return '%s' % (str(self.case)) + + +class NewGraduationMonitoring(models.Model): + + month_id = models.IntegerField(max_length=3) + household = models.ForeignKey(OVCHouseHold, on_delete=models.CASCADE) + bench_mark_1 = models.IntegerField(default=0) + bench_mark_2 = models.IntegerField(default=0) + bench_mark_3 = models.IntegerField(default=0) + bench_mark_4 = models.IntegerField(default=0) + bench_mark_5 = models.IntegerField(default=0) + bench_mark_6 = models.IntegerField(default=0) + bench_mark_7 = models.IntegerField(default=0) + bench_mark_8 = models.IntegerField(default=0) + bench_mark_9 = models.IntegerField(default=0) + event = models.ForeignKey(OVCCareEvents, on_delete=models.CASCADE) + care_giver = models.ForeignKey(RegPerson, on_delete=models.CASCADE) + date_of_event = models.DateField(default=timezone.now) + timestamp_created = models.DateTimeField(default=timezone.now) + timestamp_updated = models.DateTimeField(auto_now=True) + + def __unicode__(self): + return str(self.month_id) + + class Meta: + db_table = 'new_graduation_monitoring' + + def __unicode__(self): + return str(self.month_id) + +class OVCFMPEvaluation(models.Model): + evaluation_id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) + person = models.ForeignKey(RegPerson, on_delete=models.CASCADE) + assessment_type = models.CharField(max_length=20, null=True) + Q_1 = models.CharField(max_length=50, null=True) + Q_2 = models.CharField(max_length=50, null=True) + Q_3 = models.CharField(max_length=50, null=True) + Q_4 = models.CharField(max_length=50, null=True) + Q_5 = models.CharField(max_length=50, null=True) + Q_6 = models.CharField(max_length=50, null=True) + Q_7 = models.CharField(max_length=50, null=True) + Q_8 = models.CharField(max_length=50, null=True) + Q_9 = models.CharField(max_length=50, null=True) + + date_of_event = models.DateField(default=timezone.now, null=True)### date + timestamp_created = models.DateTimeField(auto_now_add=True) + timestamp_updated = models.DateTimeField(auto_now=True) + + class Meta: + db_table = 'ovc_fmp_evaluation' + + +class OVCPreventiveEvents(models.Model): + event = models.UUIDField(primary_key=True, default=uuid.uuid1, editable=False) + event_type_id = models.CharField(max_length=20) + event_counter = models.IntegerField(default=0) + event_score = models.IntegerField(null=True, default=0) + date_of_event = models.DateField(default=timezone.now) + date_of_previous_event = models.DateTimeField(null=True) + created_by = models.IntegerField(null=True, default=404) + timestamp_created = models.DateTimeField(default=timezone.now) + is_void = models.BooleanField(default=False) + sync_id = models.UUIDField(default=uuid.uuid1, editable=False) + app_user = models.ForeignKey(AppUser, default=1, on_delete=models.CASCADE) + person = models.ForeignKey(RegPerson, null=True, on_delete=models.CASCADE) + house_hold = models.ForeignKey(OVCHouseHold, null=True, on_delete=models.CASCADE) + + class Meta: + db_table = 'ovc_preventive_events' + + +class OVCPrevSinovyoCaregiverEvaluation(models.Model): + evaluation_id = models.UUIDField(primary_key=True, default=uuid.uuid1, editable=False) + person = models.ForeignKey(RegPerson, on_delete=models.CASCADE) + ref_caregiver = models.ForeignKey(RegPerson, on_delete=models.CASCADE, related_name='preval_caregiver') + type_of_assessment = models.CharField(max_length=10) + date_of_assessment = models.DateTimeField(null=False) + bd_age = models.CharField(max_length=10) + bd_sex = models.CharField(max_length=10) + bd_read = models.CharField(max_length=10) + bd_education_level = models.CharField(max_length=10) + bd_biological_children = models.CharField(max_length=10) + bd_non_biological_children = models.CharField(max_length=10) + bd_children_not_in_school = models.CharField(max_length=10) + bd_source_income = models.CharField(max_length=10) + bd_adults_contribute_hh_income = models.CharField(max_length=10) + bd_children_contribute_hh_income = models.CharField(max_length=10) + bd_biological_mother = models.CharField(max_length=10) + bd_bm_live_hh = models.CharField(max_length=10, null=True) + bd_biological_father = models.CharField(max_length=10) + bd_bf_live_hh = models.CharField(max_length=10, null=True) + bd_money_basic_expenses = models.CharField(max_length=10) + bd_violence = models.CharField(max_length=10) + bd_adult_unwell = models.CharField(max_length=10) + bd_child_unwell = models.CharField(max_length=10) + bd_miss_school = models.CharField(max_length=10) + bd_hiv_status = models.CharField(max_length=10) + bd_children_hiv_status = models.CharField(max_length=10) + bd_hiv_prevention = models.CharField(max_length=10) + bd_two_meals = models.CharField(max_length=10) + bd_missing_meal = models.CharField(max_length=10) + rc_discuss_child_needs = models.CharField(max_length=10) + rc_discipline = models.CharField(max_length=10) + rc_tells_bothering = models.CharField(max_length=10) + rc_involve_decisions = models.CharField(max_length=10) + cb_child_obedient = models.CharField(max_length=10) + cb_fights_children = models.CharField(max_length=10) + dc_often_discipline = models.CharField(max_length=10) + dc_physical_discipline = models.CharField(max_length=10) + dc_upset_child = models.CharField(max_length=10) + sp_caring_energy = models.CharField(max_length=10) + sp_source_stress = models.CharField(max_length=10) + sp_physical_punish = models.CharField(max_length=10) + fs_depressed = models.CharField(max_length=10) + fs_effort = models.CharField(max_length=10) + fs_hopeful = models.CharField(max_length=10) + fi_money_important_items = models.CharField(max_length=10) + fi_worried_money = models.CharField(max_length=10) + event = models.ForeignKey(OVCPreventiveEvents, on_delete=models.CASCADE) + fmp_pre_grouping_id = models.UUIDField(default=uuid.uuid1, editable=False) + timestamp_created = models.DateTimeField(default=timezone.now) + timestamp_updated = models.DateTimeField(default=timezone.now) + is_void = models.BooleanField(default=False) + sync_id = models.UUIDField(default=uuid.uuid1, editable=False) + + class Meta: + db_table = 'ovc_prev_sinovuyo_caregiver_evaluation' + + def __unicode__(self): + return str(self.evaluation_id) + + def get_all_objects(self): + queryset = self._meta.model.objects.all() + return queryset \ No newline at end of file diff --git a/cpovc_forms/urls.py b/cpovc_forms/urls.py index 2d997ab3a..1ac0a92ec 100644 --- a/cpovc_forms/urls.py +++ b/cpovc_forms/urls.py @@ -177,10 +177,14 @@ # Dreams SerivceUptake Form re_path('dreamsform/new/(?P\d+)/', views.new_dreamsform, name='new_dreamsform'), + # Sinovuyo Care-giver Preventive Pre and Post Program Assessment Form + re_path('ovc-preventive-progress-assessment/new/(?P\d+)/', views.ovc_preventive_pre_post_program_assessment_view, name='progress-assessment'), + re_path('ovc-preventive-progress-assessment/edit/(?P[\w-]+)/$', views.ovc_preventive_pre_post_program_assessment_edit_view, name='progress-assessment-edit'), + re_path('ovc-preventive-progress-assessment/delete/', views.ovc_preventive_pre_post_program_assessment_delete_view, name='progress-assessment_delete'), + #edit hivriskscreening tool path('hivriskscreeningtool/edit/(?P\W+)/', views.edit_hivriskscreeningtool, name='hivriskscreeningtool'), #Delete hivscreening tool path('delete_hivriskscreening/(?P)/', views.delete_hivriskscreening, name='delete_hivriskscreening'), - -] +] \ No newline at end of file diff --git a/cpovc_forms/views.py b/cpovc_forms/views.py index b8b4b34a7..2518e835b 100644 --- a/cpovc_forms/views.py +++ b/cpovc_forms/views.py @@ -2,11 +2,13 @@ from django.urls import reverse, resolve from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponseRedirect, HttpResponse, JsonResponse +from dateutil.relativedelta import relativedelta from django.contrib import messages from django.utils import timezone from django.core import serializers from django.conf import settings from django.db.models import Q + import json import random import ast @@ -23,7 +25,8 @@ OVC_CaseEventForm, DocumentsManager, OVCSchoolForm, OVCBursaryForm, BackgroundDetailsForm, OVC_FTFCForm, OVCCsiForm, OVCF1AForm, OVCHHVAForm, Wellbeing, GOKBursaryForm, CparaAssessment, CparaMonitoring, CasePlanTemplate, WellbeingAdolescentForm, HIV_SCREENING_FORM, - HIV_MANAGEMENT_ARV_THERAPY_FORM, HIV_MANAGEMENT_VISITATION_FORM, DREAMS_FORM) + HIV_MANAGEMENT_ARV_THERAPY_FORM, HIV_MANAGEMENT_VISITATION_FORM, DREAMS_FORM, NewGraduationMonitoringForm, + OVCPreventivePrePostProgramAssessmentForm ) from .models import ( OVCEconomicStatus, OVCFamilyStatus, OVCReferral, OVCHobbies, OVCFriends, @@ -36,7 +39,8 @@ OVCFamilyCare, OVCCaseEventSummon, OVCCareEvents, OVCCarePriority, OVCCareServices, OVCCareEAV, OVCCareAssessment, OVCGokBursary, OVCCareWellbeing, OVCCareCpara, OVCCareQuestions, OVCCareForms, OVCExplanations, OVCCareF1B, - OVCCareBenchmarkScore, OVCMonitoring, OVCHouseholdDemographics, OVCHivStatus, OVCHIVManagement, OVCHIVRiskScreening) + OVCCareBenchmarkScore, OVCMonitoring, OVCHouseholdDemographics, OVCHivStatus, OVCHIVManagement, OVCHIVRiskScreening, + OVCPrevSinovyoCaregiverEvaluation, OVCPreventiveEvents) from cpovc_ovc.models import OVCRegistration, OVCHHMembers, OVCHealth, OVCHouseHold, OVCFacility from cpovc_main.functions import ( get_list_of_org_units, get_dict, get_vgeo_list, get_vorg_list, @@ -59,6 +63,7 @@ from cpovc_ovc.functions import get_ovcdetails from .functions import create_fields, create_form_fields, save_form1b, save_bursary from .documents import create_mcert +from urllib.parse import quote def validate_serialnumber(user_id, subcounty, serial_number): @@ -10008,6 +10013,276 @@ def new_dreamsform(request, id): {'form': form, 'init_data': init_data, 'vals': vals}) +# Sinovuyo Care-giver Preventive Pre and Post Program Assessment Form +def fetch_objects(id): + """ + Map model obejcts to form + Args: id + Return: form + """ + object = OVCPrevSinovyoCaregiverEvaluation.objects.get(evaluation_id=id) + data = { + 'person_id': object.person_id, + 'ref_caregiver_id': object.ref_caregiver_id, + 'type_of_assessment': object.type_of_assessment, + 'date_of_assessment': object.date_of_assessment, + 'bd_age': object.bd_age, + 'bd_sex': object.bd_sex, + 'bd_read': object.bd_read, + 'bd_education_level': object.bd_education_level, + 'bd_biological_children': object.bd_biological_children, + 'bd_non_biological_children': object.bd_non_biological_children, + 'bd_children_not_in_school': object.bd_children_not_in_school, + 'bd_source_income': object.bd_source_income, + 'bd_adults_contribute_hh_income': object.bd_adults_contribute_hh_income, + 'bd_children_contribute_hh_income': object.bd_children_contribute_hh_income, + 'bd_biological_mother': object.bd_biological_mother, + 'bd_bm_live_hh': object.bd_bm_live_hh, + 'bd_biological_father': object.bd_biological_father, + 'bd_bf_live_hh': object.bd_bf_live_hh, + 'bd_money_basic_expenses': object.bd_money_basic_expenses, + 'bd_violence': object.bd_violence, + 'bd_adult_unwell': object.bd_adult_unwell, + 'bd_child_unwell': object.bd_child_unwell, + 'bd_miss_school': object.bd_miss_school, + 'bd_hiv_status': object.bd_hiv_status, + 'bd_children_hiv_status': object.bd_children_hiv_status, + 'bd_hiv_prevention': object.bd_hiv_prevention, + 'bd_two_meals': object.bd_two_meals, + 'bd_missing_meal': object.bd_missing_meal, + 'rc_discuss_child_needs': object.rc_discuss_child_needs, + 'rc_tells_bothering': object.rc_tells_bothering, + 'rc_involve_decisions': object.rc_involve_decisions, + 'rc_discipline': object.rc_discipline, + 'cb_child_obedient': object.cb_child_obedient, + 'cb_fights_children': object.cb_fights_children, + 'dc_physical_discipline': object.dc_physical_discipline, + 'dc_often_discipline': object.dc_often_discipline, + 'dc_upset_child': object.dc_upset_child, + 'sp_caring_energy': object.sp_caring_energy, + 'sp_source_stress': object.sp_source_stress, + 'sp_physical_punish': object.sp_physical_punish, + 'fs_depressed': object.fs_depressed, + 'fs_hopeful': object.fs_hopeful, + 'fs_effort': object.fs_effort, + 'fi_money_important_items': object.fi_money_important_items, + 'fi_worried_money': object.fi_worried_money, + } + form = OVCPreventivePrePostProgramAssessmentForm(data=data) + return form + +# Sinovuyo Care-giver Preventive Pre and Post Program Assessment Form +def ovc_preventive_pre_post_program_assessment_view(request, id): + """ + new Sinovuyo Care-giver Preventive Pre and Post Program Assessment Form input view + Args: + request, id + Return: + render template forms/caregiver_progress_assessment.html, context + """ + user_id = request.user.id + username = request.user.get_username() + child = RegPerson.objects.get(id=id) + person_id = child.id + house_hold = OVCHouseHold.objects.get(id=OVCHHMembers.objects.get(person=child).house_hold_id) + care_giver = RegPerson.objects.get(id=OVCRegistration.objects.get(person=child).caretaker_id) + care_giver_id = care_giver.id + if care_giver.id == id: + care_giver_id = id + care_giver_gender = care_giver.sex_id + if care_giver_gender == 'SMAL': + care_giver_gender = 'Male' + else: + care_giver_gender = 'Female' + check_fields = ['yesno_id', 'school_level_id', 'under_care_id', + 'employed_id', 'agree_id', 'mother_mortality_id', + 'father_mortality_id', 'literacy_lvl_id', 'my_behaviour_id', + 'programme_id', 'relationship_caregiver_id', 'often_id', 'feeling_sad_id', + 'dsp_times_id', 'under_care_id',] + vals = get_dict(field_name=check_fields) + if request.method == 'POST': + form = OVCPreventivePrePostProgramAssessmentForm(request.POST) + event_type_id = 'CARGV_A' + event_counter = OVCCareEvents.objects.filter( + event_type_id=event_type_id, + person=id, + is_void=False, + ).count() + # OVC Preventive event counter + ovc_preventive_event = OVCPreventiveEvents( + event_type_id=event_type_id, + event_counter=event_counter, + event_score=0, + date_of_event=timezone.now(), + date_of_previous_event=timezone.now(), + created_by=user_id, + app_user=AppUser.objects.get(username=username), + person=RegPerson.objects.get(pk=care_giver.id), + house_hold=house_hold + ) + if form.is_valid(): + ovc_preventive_event.save() + OVCPrevSinovyoCaregiverEvaluation( + event_id=ovc_preventive_event.event, + person_id=person_id, + ref_caregiver_id=care_giver_id, + date_of_assessment=request.POST.get('date_of_assessment'), + type_of_assessment=request.POST.get('type_of_assessment'), + bd_age=care_giver.age, + bd_sex=care_giver.sex_id, + bd_read=request.POST.get('bd_read'), + bd_education_level=request.POST.get('bd_education_level'), + bd_biological_children=request.POST.get('bd_biological_children'), + bd_non_biological_children=request.POST.get('bd_non_biological_children'), + bd_children_not_in_school=request.POST.get('bd_children_not_in_school'), + bd_source_income=request.POST.get('bd_source_income'), + bd_adults_contribute_hh_income=request.POST.get('bd_adults_contribute_hh_income'), + bd_children_contribute_hh_income=request.POST.get('bd_children_contribute_hh_income'), + bd_biological_mother=request.POST.get('bd_biological_mother'), + bd_bm_live_hh=request.POST.get('bd_bm_live_hh'), + bd_biological_father=request.POST.get('bd_biological_father'), + bd_bf_live_hh=request.POST.get('bd_bf_live_hh'), + bd_money_basic_expenses=request.POST.get('bd_money_basic_expenses'), + bd_violence=request.POST.get('bd_violence'), + bd_adult_unwell=request.POST.get('bd_adult_unwell'), + bd_child_unwell=request.POST.get('bd_child_unwell'), + bd_miss_school=request.POST.get('bd_miss_school'), + bd_hiv_status=request.POST.get('bd_hiv_status'), + bd_children_hiv_status=request.POST.get('bd_children_hiv_status'), + bd_hiv_prevention=request.POST.get('bd_hiv_prevention'), + bd_two_meals=request.POST.get('bd_two_meals'), + bd_missing_meal=request.POST.get('bd_missing_meal'), + rc_discuss_child_needs=request.POST.get('rc_discuss_child_needs'), + rc_discipline=request.POST.get('rc_discipline'), + rc_tells_bothering=request.POST.get('rc_tells_bothering'), + rc_involve_decisions=request.POST.get('rc_involve_decisions'), + cb_child_obedient=request.POST.get('cb_child_obedient'), + cb_fights_children=request.POST.get('cb_fights_children'), + dc_often_discipline=request.POST.get('dc_often_discipline'), + dc_physical_discipline=request.POST.get('dc_physical_discipline'), + dc_upset_child=request.POST.get('dc_upset_child'), + sp_caring_energy=request.POST.get('sp_caring_energy'), + sp_source_stress=request.POST.get('sp_source_stress'), + sp_physical_punish=request.POST.get('sp_physical_punish'), + fs_depressed=request.POST.get('fs_depressed'), + fs_effort=request.POST.get('fs_effort'), + fs_hopeful=request.POST.get('fs_hopeful'), + fi_money_important_items=request.POST.get('fi_money_important_items'), + fi_worried_money=request.POST.get('fi_worried_money'), + ).save() + messages.success(request, 'Sinovuyo Care Giver Preventive Pre and Post Program Assessment Form saved succesfully!') + else: + messages.error(request, form.errors) + print(form.errors) + return HttpResponseRedirect('progress-assessment') + else: + form = OVCPreventivePrePostProgramAssessmentForm() + event = OVCPreventiveEvents.objects.filter(person_id=care_giver.id).values_list('event') + queryset = OVCPrevSinovyoCaregiverEvaluation.objects.filter(event_id__in=event).order_by('date_of_assessment') + evaluation = [] + # validate void/deleted existing model instances + for i in range(0, len(queryset)): + if queryset[i].is_void == False: + evaluation.append(queryset[i]) + return render(request=request, template_name='forms/caregiver_progress_assessment.html', + context={'form': form, 'child': child, 'care_giver': care_giver, + 'care_giver_gender': care_giver_gender, 'objects': evaluation, 'vals': vals}) + + +def ovc_preventive_pre_post_program_assessment_edit_view(request, id): + """ + Sinovuyo Care-giver Preventive Pre and Post Program Assessment edit instance form instance + Args: + evaluation_id, request + + Return: + forms/caregiver_progress_assessment.html, context + + """ + form = fetch_objects(id) + object = OVCPrevSinovyoCaregiverEvaluation.objects.get(evaluation_id=id) + person_id = object.person_id + if request.method == 'POST': + form = OVCPreventivePrePostProgramAssessmentForm(request.POST) + OVCPrevSinovyoCaregiverEvaluation.objects.filter(evaluation_id=id).update( + bd_read=request.POST.get('bd_read'), + bd_education_level=request.POST.get('bd_education_level'), + bd_biological_children=request.POST.get('bd_biological_children'), + bd_non_biological_children=request.POST.get('bd_non_biological_children'), + bd_children_not_in_school=request.POST.get('bd_children_not_in_school'), + bd_source_income=request.POST.get('bd_source_income'), + bd_adults_contribute_hh_income=request.POST.get('bd_adults_contribute_hh_income'), + bd_children_contribute_hh_income=request.POST.get('bd_children_contribute_hh_income'), + bd_biological_mother=request.POST.get('bd_biological_mother'), + bd_bm_live_hh=request.POST.get('bd_bm_live_hh'), + bd_biological_father=request.POST.get('bd_biological_father'), + bd_bf_live_hh=request.POST.get('bd_bf_live_hh'), + bd_money_basic_expenses=request.POST.get('bd_money_basic_expenses'), + bd_violence=request.POST.get('bd_violence'), + bd_adult_unwell=request.POST.get('bd_adult_unwell'), + bd_child_unwell=request.POST.get('bd_child_unwell'), + bd_miss_school=request.POST.get('bd_miss_school'), + bd_hiv_status=request.POST.get('bd_hiv_status'), + bd_children_hiv_status=request.POST.get('bd_children_hiv_status'), + bd_hiv_prevention=request.POST.get('bd_hiv_prevention'), + bd_two_meals=request.POST.get('bd_two_meals'), + bd_missing_meal=request.POST.get('bd_missing_meal'), + rc_discuss_child_needs=request.POST.get('rc_discuss_child_needs'), + rc_discipline=request.POST.get('rc_discipline'), + rc_tells_bothering=request.POST.get('rc_tells_bothering'), + rc_involve_decisions=request.POST.get('rc_involve_decisions'), + cb_child_obedient=request.POST.get('cb_child_obedient'), + cb_fights_children=request.POST.get('cb_fights_children'), + dc_often_discipline=request.POST.get('dc_often_discipline'), + dc_physical_discipline=request.POST.get('dc_physical_discipline'), + dc_upset_child=request.POST.get('dc_upset_child'), + sp_caring_energy=request.POST.get('sp_caring_energy'), + sp_source_stress=request.POST.get('sp_source_stress'), + sp_physical_punish=request.POST.get('sp_physical_punish'), + fs_depressed=request.POST.get('fs_depressed'), + fs_effort=request.POST.get('fs_effort'), + fs_hopeful=request.POST.get('fs_hopeful'), + fi_money_important_items=request.POST.get('fi_money_important_items'), + fi_worried_money=request.POST.get('fi_worried_money')) + messages.success(request, 'Sinovuyo Care Giver Preventive Pre and Post Program Assessment Form updated succesfully!') + url = reverse('ovc_view', kwargs={'id':person_id}) + return HttpResponseRedirect(url) + edit = True + context={'form': form, 'edit_form': edit, 'status': 200} + return render(request, 'forms/caregiver_progress_assessment.html',context) + + +def ovc_preventive_pre_post_program_assessment_delete_view(request): + """ + Sinovuyo Care-giver Preventive Pre and Post Program Assessment delete Form instance + Args: + request + + Return: + data(Jason Format) + """ + id = request.GET.get('evaluation_id', None) + object = OVCPrevSinovyoCaregiverEvaluation.objects.get(evaluation_id=id) + date = object.date_of_assessment + delta = relativedelta(days=-60) + due_del_date = date - delta + today_date = timezone.now() + + if today_date <= due_del_date: + OVCPrevSinovyoCaregiverEvaluation.objects.filter(evaluation_id=id).update(is_void=True) + object_void = OVCPrevSinovyoCaregiverEvaluation.objects.get(evaluation_id=id) + deleted = object_void.is_void + if deleted == True: + data = { + 'deleted': True , + 'msg_info': 'Deleted successfully' + } + return JsonResponse(data) + data = { + 'deleted': False , + 'msg_info': 'Cannot be deleted as from date {}'.format(due_del_date) + } + return JsonResponse(data) def edit_hivriskscreeningtool(request, id): try: diff --git a/cpovc_gis/__pycache__/admin.cpython-310.pyc b/cpovc_gis/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index 557ac7f14..000000000 Binary files a/cpovc_gis/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_gis/__pycache__/models.cpython-310.pyc b/cpovc_gis/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 59e8e327c..000000000 Binary files a/cpovc_gis/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_gis/__pycache__/urls.cpython-310.pyc b/cpovc_gis/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index 1ed170ee1..000000000 Binary files a/cpovc_gis/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_gis/__pycache__/views.cpython-310.pyc b/cpovc_gis/__pycache__/views.cpython-310.pyc deleted file mode 100644 index ca3b3441d..000000000 Binary files a/cpovc_gis/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_help/__pycache__/__init__.cpython-310.pyc b/cpovc_help/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 45153cac6..000000000 Binary files a/cpovc_help/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/cpovc_help/__pycache__/admin.cpython-310.pyc b/cpovc_help/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index 831ecac20..000000000 Binary files a/cpovc_help/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_help/__pycache__/models.cpython-310.pyc b/cpovc_help/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 086ffea9b..000000000 Binary files a/cpovc_help/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_main/__pycache__/__init__.cpython-310.pyc b/cpovc_main/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index f431a4171..000000000 Binary files a/cpovc_main/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/cpovc_main/__pycache__/admin.cpython-310.pyc b/cpovc_main/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index 8ad946c33..000000000 Binary files a/cpovc_main/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_main/__pycache__/country.cpython-310.pyc b/cpovc_main/__pycache__/country.cpython-310.pyc deleted file mode 100644 index c39887ce2..000000000 Binary files a/cpovc_main/__pycache__/country.cpython-310.pyc and /dev/null differ diff --git a/cpovc_main/__pycache__/functions.cpython-310.pyc b/cpovc_main/__pycache__/functions.cpython-310.pyc deleted file mode 100644 index 09c9fff68..000000000 Binary files a/cpovc_main/__pycache__/functions.cpython-310.pyc and /dev/null differ diff --git a/cpovc_main/__pycache__/models.cpython-310.pyc b/cpovc_main/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 5f0ea25bf..000000000 Binary files a/cpovc_main/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_main/fixtures/teen_doc_.csv b/cpovc_main/fixtures/teen_doc_.csv new file mode 100644 index 000000000..be8be9fbd --- /dev/null +++ b/cpovc_main/fixtures/teen_doc_.csv @@ -0,0 +1,36 @@ +pk,the_order,field_name,item_category,item_id,item_description,item_description_short,item_sub_category,user_configurable,sms_keyword,is_void +32045,1,adoption_unit_type_id,Adoption,TNSA,Adoption Society,Adoption,,FALSE,FALSE,FALSE +32046,1,dsp_times_id,Displine,DSPN,Never,Never,,FALSE,FALSE,FALSE +32047,2,dsp_times_id,Displine,DSP1,1 time,1 time,,FALSE,FALSE,FALSE +32048,3,dsp_times_id,Displine,DSP2,2 times,2 times,,FALSE,FALSE,FALSE +32049,4,dsp_times_id,Displine,DSP3,3 times,3 times,,FALSE,FALSE,FALSE +32050,5,dsp_times_id,Displine,DSP4,4 times,4 times,,FALSE,FALSE,FALSE +32051,6,dsp_times_id,Displine,DSP5,5 times,5 times,,FALSE,FALSE,FALSE +32052,7,dsp_times_id,Displine,DSP6,6 times,6 times,,FALSE,FALSE,FALSE +32053,8,dsp_times_id,Displine,DSP7,7 times,7 times,,FALSE,FALSE,FALSE +32054,9,dsp_times_id,Displine,DSP8,8 times,8 times,,FALSE,FALSE,FALSE +32055,1,feeling_sad_id,Feeling_Sad,FSD1,Rarely or none of the time less than 1 day,Rarely,,FALSE,FALSE,FALSE +32056,2,feeling_sad_id,Feeling_Sad,FSD2,Some or a little of the time (1-2 days),Some,,FALSE,FALSE,FALSE +32057,3,feeling_sad_id,Feeling_Sad,FSD3,Occasionally or a moderate amount of time (3-4 days),Occassionally,,FALSE,FALSE,FALSE +32058,4,feeling_sad_id,Feeling_Sad,FSD4,Most or all of the time (5-7 days),Most,,FALSE,FALSE,FALSE +32059,1,my_behaviour_id,Behaviour,MBHV1,Not true,Not true,,FALSE,FALSE,FALSE +32060,2,my_behaviour_id,Behaviour,MBHV2,Somewhat true,Somewhat true,,FALSE,FALSE,FALSE +32061,3,my_behaviour_id,Behaviour,MBHV3,Very true,Very true,,FALSE,FALSE,FALSE +32062,1,relationship_caregiver_id,Relationship_caregiver,RTN1,Never,Never,,FALSE,FALSE,FALSE +32063,2,relationship_caregiver_id,Relationship_caregiver,RTN2,Almost never,Almost never,,FALSE,FALSE,FALSE +32064,3,relationship_caregiver_id,Relationship_caregiver,RTN3,Sometimes,Sometimes,,FALSE,FALSE,FALSE +32065,4,relationship_caregiver_id,Relationship_caregiver,RTN4,Often,Often,,FALSE,FALSE,FALSE +32066,5,relationship_caregiver_id,Relationship_caregiver,RTN5,Always,Always,,FALSE,FALSE,FALSE +32067,1,father_mortality_id,Father_mortality,FMT1,Yes,Yes,,FALSE,FALSE,FALSE +32068,2,father_mortality_id,Father_mortality,FMT2,"No, he passed away","No, he passed away",,FALSE,FALSE,FALSE +32069,3,father_mortality_id,Father_mortality,FMT3,"No, he lives elsewhere","No, he lives elsewhere",,FALSE,FALSE,FALSE +32070,4,mother_mortality_id,Mother_mortality,MMT1,Yes,Yes,,FALSE,FALSE,FALSE +32071,5,mother_mortality_id,Mother_mortality,MMT2,"No, she passed away","No, she passed away",,FALSE,FALSE,FALSE +32072,6,mother_mortality_id,Mother_mortality,MMT3,"No, she lives elsewhere","No, she lives elsewhere",,FALSE,FALSE,FALSE +32073,1,literacy_lvl_id,Literacy_lvl,LIT1,Cannot read at all,Cannot read at all,,FALSE,FALSE,FALSE +32074,2,literacy_lvl_id,Literacy_lvl,LIT2,Can read but with lots of difficulty,Can read but with lots of difficulty,,FALSE,FALSE,FALSE +32075,3,literacy_lvl_id,Literacy_lvl,LIT3,Can read with a little difficulty,Can read with a little difficulty,,FALSE,FALSE,FALSE +32076,4,literacy_lvl_id,Literacy_lvl,LIT4,Can read easily,Can read easily,,FALSE,FALSE,FALSE +32077,1,under_care_id,Under_care,UCR,No,No,,FALSE,FALSE,FALSE +32078,2,under_care_id,Under_care,UCR1,"Yes, all of them",Yes,,FALSE,FALSE,FALSE +32079,3,under_care_id,Under_care,UCR2,"Yes, some of them","Yes, some of them",,FALSE,FALSE,FALSE \ No newline at end of file diff --git a/cpovc_main/migrations/0001_initial.py b/cpovc_main/migrations/0001_initial.py new file mode 100644 index 000000000..2550a1b9b --- /dev/null +++ b/cpovc_main/migrations/0001_initial.py @@ -0,0 +1,468 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:28 + +from django.db import migrations, models +import django.db.models.deletion +import django.utils.timezone +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('cpovc_registry', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='AdminCaptureSites', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('org_unit_id', models.IntegerField(null=True)), + ('capture_site_name', models.CharField(blank=True, max_length=255, null=True)), + ('date_installed', models.DateField(blank=True, null=True)), + ('approved', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'admin_capture_sites', + }, + ), + migrations.CreateModel( + name='AdminDownload', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('capture_site_id', models.IntegerField(blank=True, null=True)), + ('section_id', models.CharField(max_length=4, null=True)), + ('timestamp_started', models.DateTimeField(null=True)), + ('timestamp_completed', models.DateTimeField(null=True)), + ('number_records', models.IntegerField(null=True)), + ('request_id', models.CharField(max_length=64, null=True)), + ('success', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'admin_download', + }, + ), + migrations.CreateModel( + name='CaptureTaskTracker', + fields=[ + ('id', models.AutoField(primary_key=True, serialize=False)), + ('task_id', models.CharField(max_length=64, null=True)), + ('operation', models.CharField(max_length=8, null=True)), + ('timestamp_started', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_completed', models.DateTimeField(null=True)), + ('completed', models.BooleanField(default=False)), + ('cancelled', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'admin_task_tracker', + }, + ), + migrations.CreateModel( + name='CoreEncounters', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('encounter_date', models.DateField()), + ('org_unit_id', models.IntegerField()), + ('area_id', models.IntegerField()), + ('encounter_type_id', models.CharField(max_length=4)), + ('sms_id', models.IntegerField(null=True)), + ('form_id', models.IntegerField(null=True)), + ('timestamp_created', models.DateTimeField(null=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ('beneficiary_person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='encounter_beneficiary', to='cpovc_registry.regperson')), + ('workforce_person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='encounter_workforce', to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'core_encounters', + }, + ), + migrations.CreateModel( + name='FacilityList', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('facility_code', models.IntegerField()), + ('facility_name', models.CharField(max_length=255)), + ('county_id', models.IntegerField()), + ('county_name', models.CharField(max_length=255)), + ('subcounty_id', models.IntegerField()), + ('subcounty_name', models.CharField(max_length=255)), + ('latitude', models.DecimalField(decimal_places=5, max_digits=10)), + ('longitude', models.DecimalField(decimal_places=5, max_digits=10)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ('is_void', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'facility_list', + }, + ), + migrations.CreateModel( + name='Forms', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('form_guid', models.CharField(max_length=64)), + ('form_title', models.CharField(max_length=255, null=True)), + ('form_type_id', models.CharField(max_length=4, null=True)), + ('form_subject_id', models.IntegerField(null=True)), + ('form_area_id', models.IntegerField(null=True)), + ('date_began', models.DateField(null=True)), + ('date_ended', models.DateField(null=True)), + ('date_filled_paper', models.DateField(null=True)), + ('person_id_filled_paper', models.IntegerField(null=True)), + ('org_unit_id_filled_paper', models.IntegerField(null=True)), + ('capture_site_id', models.IntegerField(blank=True, null=True)), + ('user_id_created', models.CharField(max_length=9, null=True)), + ('timestamp_created', models.DateTimeField(null=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ('user_id_updated', models.CharField(max_length=9, null=True)), + ('is_void', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'forms', + }, + ), + migrations.CreateModel( + name='ListAnswers', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer_set_id', models.IntegerField(db_index=True, null=True)), + ('answer_code', models.CharField(blank=True, db_index=True, max_length=6, null=True)), + ('answer', models.CharField(blank=True, max_length=255, null=True)), + ('the_order', models.IntegerField(db_index=True, null=True)), + ('timestamp_created', models.DateTimeField(null=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ('is_void', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'list_answers', + }, + ), + migrations.CreateModel( + name='ListQuestions', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('question_text', models.CharField(blank=True, max_length=255, null=True)), + ('question_code', models.CharField(max_length=50)), + ('form_type_id', models.CharField(blank=True, max_length=4, null=True)), + ('answer_type_id', models.CharField(blank=True, max_length=4, null=True)), + ('answer_set_id', models.IntegerField(db_index=True, null=True)), + ('the_order', models.IntegerField(db_index=True, null=True)), + ('timestamp_created', models.DateTimeField(null=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ('is_void', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'list_questions', + }, + ), + migrations.CreateModel( + name='ListReports', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('report_code', models.CharField(blank=True, max_length=100, null=True)), + ('report_title_short', models.CharField(max_length=255, null=True)), + ('report_title_long', models.CharField(max_length=255, null=True)), + ], + options={ + 'db_table': 'list_reports', + }, + ), + migrations.CreateModel( + name='RegTemp', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('user_id', models.IntegerField()), + ('page_id', models.CharField(max_length=100)), + ('created_at', models.DateTimeField()), + ('_data', models.TextField(blank=True, db_column='page_data')), + ], + options={ + 'db_table': 'reg_temp_data', + }, + ), + migrations.CreateModel( + name='ReportsSets', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('set_name', models.CharField(max_length=70)), + ('set_type_id', models.CharField(default='SORG', max_length=4)), + ('user_id_created', models.IntegerField()), + ], + options={ + 'db_table': 'reports_sets', + }, + ), + migrations.CreateModel( + name='SetupGeography', + fields=[ + ('area_id', models.IntegerField(primary_key=True, serialize=False)), + ('area_type_id', models.CharField(max_length=50)), + ('area_name', models.CharField(max_length=100)), + ('area_code', models.CharField(max_length=10, null=True)), + ('parent_area_id', models.IntegerField(null=True)), + ('area_name_abbr', models.CharField(max_length=5, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ('is_void', models.BooleanField(default=False)), + ], + options={ + 'verbose_name': 'Setup Geography', + 'verbose_name_plural': 'Setup Geographies', + 'db_table': 'list_geo', + }, + ), + migrations.CreateModel( + name='SetupList', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('item_id', models.CharField(max_length=8)), + ('item_description', models.CharField(max_length=255)), + ('item_description_short', models.CharField(max_length=100, null=True)), + ('item_category', models.CharField(blank=True, max_length=255, null=True)), + ('item_sub_category', models.CharField(blank=True, max_length=255, null=True)), + ('the_order', models.IntegerField(null=True)), + ('user_configurable', models.BooleanField(default=False)), + ('sms_keyword', models.BooleanField(default=False)), + ('is_void', models.BooleanField(default=False)), + ('field_name', models.CharField(blank=True, max_length=200, null=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ], + options={ + 'db_table': 'list_general', + }, + ), + migrations.CreateModel( + name='SetupLocation', + fields=[ + ('area_id', models.IntegerField(primary_key=True, serialize=False)), + ('area_name', models.CharField(max_length=100)), + ('area_type_id', models.CharField(max_length=50)), + ('area_code', models.CharField(max_length=10, null=True)), + ('parent_area_id', models.IntegerField(null=True)), + ('is_void', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'list_location', + }, + ), + migrations.CreateModel( + name='SchoolList', + fields=[ + ('school_id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False)), + ('school_name', models.CharField(max_length=255)), + ('type_of_school', models.CharField(max_length=26, null=True)), + ('timestamp_created', models.DateTimeField(default=django.utils.timezone.now)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ('is_void', models.BooleanField(default=False)), + ('created_by', models.IntegerField(default=404, null=True)), + ('school_subcounty', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='school_subcounty_fk', to='cpovc_main.setupgeography')), + ('school_ward', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='school_ward_fk', to='cpovc_main.setupgeography')), + ], + options={ + 'db_table': 'school_list', + }, + ), + migrations.CreateModel( + name='ListReportsParameters', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('parameter', models.CharField(blank=True, max_length=50, null=True)), + ('filter', models.CharField(blank=True, max_length=50, null=True)), + ('initially_visible', models.BooleanField(default=False)), + ('label', models.CharField(blank=True, max_length=100, null=True)), + ('tip', models.CharField(blank=True, max_length=255, null=True)), + ('required', models.BooleanField(default=False)), + ('report', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.listreports')), + ], + options={ + 'db_table': 'list_reports_parameter', + }, + ), + migrations.CreateModel( + name='FormResWorkforce', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('workforce_id', models.IntegerField(blank=True, null=True)), + ('institution_id', models.IntegerField(blank=True, null=True)), + ('position_id', models.CharField(blank=True, max_length=4, null=True)), + ('full_part_time_id', models.CharField(blank=True, max_length=4, null=True)), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ], + options={ + 'db_table': 'form_res_workforce', + }, + ), + migrations.CreateModel( + name='FormResChildren', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('child_person_id', models.IntegerField(blank=True, null=True)), + ('institution_id', models.IntegerField(blank=True, null=True)), + ('residential_status_id', models.CharField(blank=True, max_length=4, null=True)), + ('court_committal_id', models.CharField(blank=True, max_length=4, null=True)), + ('family_status_id', models.CharField(blank=True, max_length=4, null=True)), + ('date_admitted', models.DateField(blank=True, null=True)), + ('date_left', models.DateField(blank=True, null=True)), + ('sms_id', models.IntegerField(blank=True, null=True)), + ('form', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ], + options={ + 'db_table': 'form_res_children', + }, + ), + migrations.CreateModel( + name='FormPersonParticipation', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('workforce_or_beneficiary_id', models.CharField(max_length=15)), + ('participation_level_id', models.CharField(blank=True, max_length=4, null=True)), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ], + options={ + 'db_table': 'form_person_participation', + }, + ), + migrations.CreateModel( + name='FormOrgUnitContributions', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('org_unit_id', models.CharField(max_length=7)), + ('contribution_id', models.CharField(max_length=4)), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ], + options={ + 'db_table': 'form_org_unit_contribution', + }, + ), + migrations.CreateModel( + name='FormGenText', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer_text', models.CharField(blank=True, max_length=255, null=True)), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.listquestions')), + ], + options={ + 'db_table': 'form_gen_text', + }, + ), + migrations.CreateModel( + name='FormGenNumeric', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer', models.DecimalField(decimal_places=1, max_digits=10, null=True)), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.listquestions')), + ], + options={ + 'db_table': 'form_gen_numeric', + }, + ), + migrations.CreateModel( + name='FormGenDates', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer_date', models.DateField()), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.listquestions')), + ], + options={ + 'db_table': 'form_gen_dates', + }, + ), + migrations.CreateModel( + name='FormGenAnswers', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('answer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.listanswers')), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.listquestions')), + ], + options={ + 'db_table': 'form_gen_answers', + }, + ), + migrations.CreateModel( + name='CoreServices', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('encounter_date', models.DateField()), + ('core_item_id', models.CharField(max_length=4)), + ('sms_id', models.IntegerField(null=True)), + ('form_id', models.IntegerField(null=True)), + ('timestamp_created', models.DateTimeField(null=True)), + ('timestamp_updated', models.DateTimeField(auto_now=True, null=True)), + ('beneficiary_person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='service_beneficiary', to='cpovc_registry.regperson')), + ('workforce_person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='service_workforce', to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'core_services', + }, + ), + migrations.CreateModel( + name='CoreEncountersNotes', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('form_id', models.IntegerField()), + ('encounter_date', models.DateField()), + ('note_type_id', models.CharField(max_length=4)), + ('note', models.CharField(max_length=255)), + ('beneficiary_person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='encounter_n_beneficiary', to='cpovc_registry.regperson')), + ('encounter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.coreencounters')), + ('workforce_person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='encounter_n_workforce', to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'form_encounters_notes', + }, + ), + migrations.CreateModel( + name='CoreAdverseConditions', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('adverse_condition_id', models.CharField(max_length=4)), + ('is_void', models.BooleanField(default=False)), + ('sms_id', models.IntegerField(null=True)), + ('form_id', models.IntegerField(null=True)), + ('beneficiary_person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='adverse_beneficiary', to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'core_adverse_conditions', + }, + ), + migrations.CreateModel( + name='AdminUploadForms', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('timestamp_uploaded', models.DateTimeField(null=True)), + ('form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.forms')), + ], + options={ + 'db_table': 'admin_upload_forms', + }, + ), + migrations.CreateModel( + name='AdminPreferences', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('preference_id', models.CharField(max_length=4)), + ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_registry.regperson')), + ], + options={ + 'db_table': 'admin_preferences', + }, + ), + migrations.CreateModel( + name='ReportsSetsOrgUnits', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('org_unit_id', models.IntegerField()), + ('set', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cpovc_main.reportssets')), + ], + options={ + 'db_table': 'reports_sets_org_unit', + 'unique_together': {('set', 'org_unit_id')}, + }, + ), + ] diff --git a/cpovc_main/migrations/0002_alter_setuplist_item_id.py b/cpovc_main/migrations/0002_alter_setuplist_item_id.py new file mode 100644 index 000000000..999a29492 --- /dev/null +++ b/cpovc_main/migrations/0002_alter_setuplist_item_id.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_main', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='setuplist', + name='item_id', + field=models.CharField(max_length=10), + ), + ] diff --git a/cpovc_main/migrations/0003_remove_setuplist_timestamp_updated.py b/cpovc_main/migrations/0003_remove_setuplist_timestamp_updated.py new file mode 100644 index 000000000..6b5385507 --- /dev/null +++ b/cpovc_main/migrations/0003_remove_setuplist_timestamp_updated.py @@ -0,0 +1,17 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:40 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_main', '0002_alter_setuplist_item_id'), + ] + + operations = [ + migrations.RemoveField( + model_name='setuplist', + name='timestamp_updated', + ), + ] diff --git a/cpovc_main/migrations/0004_setuplist_timestamp_updated.py b/cpovc_main/migrations/0004_setuplist_timestamp_updated.py new file mode 100644 index 000000000..fc4037f68 --- /dev/null +++ b/cpovc_main/migrations/0004_setuplist_timestamp_updated.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.2 on 2022-05-05 16:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cpovc_main', '0003_remove_setuplist_timestamp_updated'), + ] + + operations = [ + migrations.AddField( + model_name='setuplist', + name='timestamp_updated', + field=models.DateTimeField(auto_now=True, null=True), + ), + ] diff --git a/cpovc_main/migrations/__pycache__/0001_initial.cpython-39.pyc b/cpovc_main/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 000000000..e4fb646b5 Binary files /dev/null and b/cpovc_main/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/cpovc_main/migrations/__pycache__/0002_alter_setuplist_item_id.cpython-39.pyc b/cpovc_main/migrations/__pycache__/0002_alter_setuplist_item_id.cpython-39.pyc new file mode 100644 index 000000000..62a09c317 Binary files /dev/null and b/cpovc_main/migrations/__pycache__/0002_alter_setuplist_item_id.cpython-39.pyc differ diff --git a/cpovc_main/migrations/__pycache__/0003_remove_setuplist_timestamp_updated.cpython-39.pyc b/cpovc_main/migrations/__pycache__/0003_remove_setuplist_timestamp_updated.cpython-39.pyc new file mode 100644 index 000000000..b936c3607 Binary files /dev/null and b/cpovc_main/migrations/__pycache__/0003_remove_setuplist_timestamp_updated.cpython-39.pyc differ diff --git a/cpovc_main/migrations/__pycache__/0004_setuplist_timestamp_updated.cpython-39.pyc b/cpovc_main/migrations/__pycache__/0004_setuplist_timestamp_updated.cpython-39.pyc new file mode 100644 index 000000000..2e4aeb55e Binary files /dev/null and b/cpovc_main/migrations/__pycache__/0004_setuplist_timestamp_updated.cpython-39.pyc differ diff --git a/cpovc_main/migrations/__pycache__/__init__.cpython-39.pyc b/cpovc_main/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..1958ed48b Binary files /dev/null and b/cpovc_main/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/cpovc_main/models.py b/cpovc_main/models.py index 524200bed..985f5b0d8 100644 --- a/cpovc_main/models.py +++ b/cpovc_main/models.py @@ -96,7 +96,7 @@ def __unicode__(self): class SetupList(models.Model): """List used for drop downs and other selections.""" - item_id = models.CharField(max_length=7) + item_id = models.CharField(max_length=10) item_description = models.CharField(max_length=255) item_description_short = models.CharField(max_length=100, null=True) item_category = models.CharField(max_length=255, null=True, blank=True) diff --git a/cpovc_manage/__pycache__/admin.cpython-310.pyc b/cpovc_manage/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index b2c123db1..000000000 Binary files a/cpovc_manage/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_manage/__pycache__/models.cpython-310.pyc b/cpovc_manage/__pycache__/models.cpython-310.pyc deleted file mode 100644 index d0a212d97..000000000 Binary files a/cpovc_manage/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_offline_mode/__pycache__/helpers.cpython-310.pyc b/cpovc_offline_mode/__pycache__/helpers.cpython-310.pyc deleted file mode 100644 index 4b9698e84..000000000 Binary files a/cpovc_offline_mode/__pycache__/helpers.cpython-310.pyc and /dev/null differ diff --git a/cpovc_offline_mode/__pycache__/urls.cpython-310.pyc b/cpovc_offline_mode/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index dda204641..000000000 Binary files a/cpovc_offline_mode/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_offline_mode/__pycache__/views.cpython-310.pyc b/cpovc_offline_mode/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 38c5ea909..000000000 Binary files a/cpovc_offline_mode/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_ovc/__pycache__/__init__.cpython-310.pyc b/cpovc_ovc/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 825c09a64..000000000 Binary files a/cpovc_ovc/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/cpovc_ovc/__pycache__/admin.cpython-310.pyc b/cpovc_ovc/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index 2491eea20..000000000 Binary files a/cpovc_ovc/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_ovc/__pycache__/apps.cpython-310.pyc b/cpovc_ovc/__pycache__/apps.cpython-310.pyc deleted file mode 100644 index 3c805218f..000000000 Binary files a/cpovc_ovc/__pycache__/apps.cpython-310.pyc and /dev/null differ diff --git a/cpovc_ovc/__pycache__/forms.cpython-310.pyc b/cpovc_ovc/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index 2c5543ebb..000000000 Binary files a/cpovc_ovc/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_ovc/__pycache__/functions.cpython-310.pyc b/cpovc_ovc/__pycache__/functions.cpython-310.pyc deleted file mode 100644 index c9a942548..000000000 Binary files a/cpovc_ovc/__pycache__/functions.cpython-310.pyc and /dev/null differ diff --git a/cpovc_ovc/__pycache__/models.cpython-310.pyc b/cpovc_ovc/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 9db51a6b9..000000000 Binary files a/cpovc_ovc/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_ovc/__pycache__/urls.cpython-310.pyc b/cpovc_ovc/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index 4268229c2..000000000 Binary files a/cpovc_ovc/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_ovc/__pycache__/views.cpython-310.pyc b/cpovc_ovc/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 72521d65a..000000000 Binary files a/cpovc_ovc/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/__pycache__/__init__.cpython-310.pyc b/cpovc_registry/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 00a432def..000000000 Binary files a/cpovc_registry/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/__pycache__/admin.cpython-310.pyc b/cpovc_registry/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index a62caa45d..000000000 Binary files a/cpovc_registry/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/__pycache__/apps.cpython-310.pyc b/cpovc_registry/__pycache__/apps.cpython-310.pyc deleted file mode 100644 index 617a38e93..000000000 Binary files a/cpovc_registry/__pycache__/apps.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/__pycache__/forms.cpython-310.pyc b/cpovc_registry/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index b201aaae1..000000000 Binary files a/cpovc_registry/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/__pycache__/functions.cpython-310.pyc b/cpovc_registry/__pycache__/functions.cpython-310.pyc deleted file mode 100644 index 8a6b1c218..000000000 Binary files a/cpovc_registry/__pycache__/functions.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/__pycache__/models.cpython-310.pyc b/cpovc_registry/__pycache__/models.cpython-310.pyc deleted file mode 100644 index a1f14bdf3..000000000 Binary files a/cpovc_registry/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/__pycache__/urls.cpython-310.pyc b/cpovc_registry/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index 9c593f720..000000000 Binary files a/cpovc_registry/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/__pycache__/views.cpython-310.pyc b/cpovc_registry/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 46c152f70..000000000 Binary files a/cpovc_registry/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_registry/forms.py b/cpovc_registry/forms.py index 56641d993..4538b64bb 100644 --- a/cpovc_registry/forms.py +++ b/cpovc_registry/forms.py @@ -211,9 +211,7 @@ def __init__(self, user, *args, **kwargs): child_ovc = forms.ChoiceField( choices=YESNO_CHOICES, - required=False, - widget=forms.RadioSelect( # renderer=RadioCustomRenderer, attrs={'id': 'child_ovc', @@ -343,17 +341,13 @@ def __init__(self, user, *args, **kwargs): 'class': 'form-control', 'id': 'staff_id'})) - workforce = forms.IntegerField( - required=False, widget=forms.TextInput( attrs={'placeholder': _('Workforce ID'), 'class': 'form-control', - 'id': 'workforce'})) - beneficiary_id = forms.IntegerField( required=False, widget=forms.TextInput( @@ -493,7 +487,6 @@ def __init__(self, user, *args, **kwargs): attrs={'rows': '3', 'class': 'form-control'})) audit_workforce = forms.IntegerField( - required=False, widget=forms.TextInput( diff --git a/cpovc_registry/templatetags/__pycache__/__init__.cpython-39.pyc b/cpovc_registry/templatetags/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..0ecb6672c Binary files /dev/null and b/cpovc_registry/templatetags/__pycache__/__init__.cpython-39.pyc differ diff --git a/cpovc_registry/templatetags/__pycache__/app_class.cpython-39.pyc b/cpovc_registry/templatetags/__pycache__/app_class.cpython-39.pyc new file mode 100644 index 000000000..8310da968 Binary files /dev/null and b/cpovc_registry/templatetags/__pycache__/app_class.cpython-39.pyc differ diff --git a/cpovc_registry/templatetags/__pycache__/app_filters-.cpython-39.pyc b/cpovc_registry/templatetags/__pycache__/app_filters-.cpython-39.pyc new file mode 100644 index 000000000..b9341c1e4 Binary files /dev/null and b/cpovc_registry/templatetags/__pycache__/app_filters-.cpython-39.pyc differ diff --git a/cpovc_registry/templatetags/__pycache__/app_filters.cpython-39.pyc b/cpovc_registry/templatetags/__pycache__/app_filters.cpython-39.pyc new file mode 100644 index 000000000..62e2f2cf7 Binary files /dev/null and b/cpovc_registry/templatetags/__pycache__/app_filters.cpython-39.pyc differ diff --git a/cpovc_registry/templatetags/__pycache__/app_forms.cpython-39.pyc b/cpovc_registry/templatetags/__pycache__/app_forms.cpython-39.pyc new file mode 100644 index 000000000..1d4b2bcaf Binary files /dev/null and b/cpovc_registry/templatetags/__pycache__/app_forms.cpython-39.pyc differ diff --git a/cpovc_registry/templatetags/__pycache__/git_version.cpython-39.pyc b/cpovc_registry/templatetags/__pycache__/git_version.cpython-39.pyc new file mode 100644 index 000000000..6c8e8e1a7 Binary files /dev/null and b/cpovc_registry/templatetags/__pycache__/git_version.cpython-39.pyc differ diff --git a/cpovc_reports/__pycache__/config.cpython-310.pyc b/cpovc_reports/__pycache__/config.cpython-310.pyc deleted file mode 100644 index 51ffb099d..000000000 Binary files a/cpovc_reports/__pycache__/config.cpython-310.pyc and /dev/null differ diff --git a/cpovc_reports/__pycache__/forms.cpython-310.pyc b/cpovc_reports/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index 4d6fafd85..000000000 Binary files a/cpovc_reports/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_reports/__pycache__/functions.cpython-310.pyc b/cpovc_reports/__pycache__/functions.cpython-310.pyc deleted file mode 100644 index 9e87b31aa..000000000 Binary files a/cpovc_reports/__pycache__/functions.cpython-310.pyc and /dev/null differ diff --git a/cpovc_reports/__pycache__/parameters.cpython-310.pyc b/cpovc_reports/__pycache__/parameters.cpython-310.pyc deleted file mode 100644 index 885a6b364..000000000 Binary files a/cpovc_reports/__pycache__/parameters.cpython-310.pyc and /dev/null differ diff --git a/cpovc_reports/__pycache__/queries.cpython-310.pyc b/cpovc_reports/__pycache__/queries.cpython-310.pyc deleted file mode 100644 index 5882be670..000000000 Binary files a/cpovc_reports/__pycache__/queries.cpython-310.pyc and /dev/null differ diff --git a/cpovc_reports/__pycache__/urls.cpython-310.pyc b/cpovc_reports/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index c400ef402..000000000 Binary files a/cpovc_reports/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_reports/__pycache__/views.cpython-310.pyc b/cpovc_reports/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 13c8b460b..000000000 Binary files a/cpovc_reports/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/cpovc_settings/__pycache__/admin.cpython-310.pyc b/cpovc_settings/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index 8f43c916e..000000000 Binary files a/cpovc_settings/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/cpovc_settings/__pycache__/forms.cpython-310.pyc b/cpovc_settings/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index a1eec11a0..000000000 Binary files a/cpovc_settings/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/cpovc_settings/__pycache__/models.cpython-310.pyc b/cpovc_settings/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 5e6b85679..000000000 Binary files a/cpovc_settings/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/cpovc_settings/__pycache__/urls.cpython-310.pyc b/cpovc_settings/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index e8329416d..000000000 Binary files a/cpovc_settings/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/cpovc_settings/__pycache__/views.cpython-310.pyc b/cpovc_settings/__pycache__/views.cpython-310.pyc deleted file mode 100644 index 276e2a078..000000000 Binary files a/cpovc_settings/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/data_cleanup/__pycache__/models.cpython-310.pyc b/data_cleanup/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 48ed98cf3..000000000 Binary files a/data_cleanup/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/data_cleanup/__pycache__/urls.cpython-310.pyc b/data_cleanup/__pycache__/urls.cpython-310.pyc deleted file mode 100644 index 832dc6abc..000000000 Binary files a/data_cleanup/__pycache__/urls.cpython-310.pyc and /dev/null differ diff --git a/data_cleanup/__pycache__/views.cpython-310.pyc b/data_cleanup/__pycache__/views.cpython-310.pyc deleted file mode 100644 index e369ff64a..000000000 Binary files a/data_cleanup/__pycache__/views.cpython-310.pyc and /dev/null differ diff --git a/data_cleanup/templatetags/__pycache__/choice_fields_filter.cpython-39.pyc b/data_cleanup/templatetags/__pycache__/choice_fields_filter.cpython-39.pyc new file mode 100644 index 000000000..cea2a5ebf Binary files /dev/null and b/data_cleanup/templatetags/__pycache__/choice_fields_filter.cpython-39.pyc differ diff --git a/notifications/__pycache__/__init__.cpython-310.pyc b/notifications/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 68d3d8fa2..000000000 Binary files a/notifications/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/notifications/__pycache__/admin.cpython-310.pyc b/notifications/__pycache__/admin.cpython-310.pyc deleted file mode 100644 index 63f554301..000000000 Binary files a/notifications/__pycache__/admin.cpython-310.pyc and /dev/null differ diff --git a/notifications/__pycache__/apps.cpython-310.pyc b/notifications/__pycache__/apps.cpython-310.pyc deleted file mode 100644 index 2ff25e069..000000000 Binary files a/notifications/__pycache__/apps.cpython-310.pyc and /dev/null differ diff --git a/notifications/__pycache__/models.cpython-310.pyc b/notifications/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 09b70c1a3..000000000 Binary files a/notifications/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/notifications/__pycache__/settings.cpython-310.pyc b/notifications/__pycache__/settings.cpython-310.pyc deleted file mode 100644 index 2b9ffb2b8..000000000 Binary files a/notifications/__pycache__/settings.cpython-310.pyc and /dev/null differ diff --git a/notifications/__pycache__/signals.cpython-310.pyc b/notifications/__pycache__/signals.cpython-310.pyc deleted file mode 100644 index 64d88d574..000000000 Binary files a/notifications/__pycache__/signals.cpython-310.pyc and /dev/null differ diff --git a/notifications/__pycache__/utils.cpython-310.pyc b/notifications/__pycache__/utils.cpython-310.pyc deleted file mode 100644 index cb6298e40..000000000 Binary files a/notifications/__pycache__/utils.cpython-310.pyc and /dev/null differ diff --git a/notifications/migrations/0002_alter_notification_id.py b/notifications/migrations/0002_alter_notification_id.py new file mode 100644 index 000000000..c3ec1991c --- /dev/null +++ b/notifications/migrations/0002_alter_notification_id.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.2 on 2022-04-29 19:52 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('notifications', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='notification', + name='id', + field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), + ), + ] diff --git a/notifications/migrations/__pycache__/0001_initial.cpython-39.pyc b/notifications/migrations/__pycache__/0001_initial.cpython-39.pyc new file mode 100644 index 000000000..cbe615463 Binary files /dev/null and b/notifications/migrations/__pycache__/0001_initial.cpython-39.pyc differ diff --git a/notifications/migrations/__pycache__/0002_alter_notification_id.cpython-39.pyc b/notifications/migrations/__pycache__/0002_alter_notification_id.cpython-39.pyc new file mode 100644 index 000000000..5960c865b Binary files /dev/null and b/notifications/migrations/__pycache__/0002_alter_notification_id.cpython-39.pyc differ diff --git a/notifications/migrations/__pycache__/__init__.cpython-39.pyc b/notifications/migrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 000000000..f6c57e80d Binary files /dev/null and b/notifications/migrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/notifications/templatetags/__pycache__/notifications_tags.cpython-39.pyc b/notifications/templatetags/__pycache__/notifications_tags.cpython-39.pyc new file mode 100644 index 000000000..0105a5a04 Binary files /dev/null and b/notifications/templatetags/__pycache__/notifications_tags.cpython-39.pyc differ diff --git a/requirements.txt b/requirements.txt index 92495b2d0..30ef0aa7a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,8 +21,6 @@ coverage==6.3.2 python-memcached==1.59 XlsxWriter==3.0.3 pandas==1.4.2 - reportlab==3.6.9 - requests==2.27.1 schedule==1.1.0 diff --git a/scripts/teen_doc_csv.csv b/scripts/teen_doc_csv.csv new file mode 100644 index 000000000..19664438e --- /dev/null +++ b/scripts/teen_doc_csv.csv @@ -0,0 +1,51 @@ +pk,the_order,field_name,item_category,item_id,item_description,item_description_short,item_sub_category,user_configurable,sms_keyword,is_void +32045,1,adoption_unit_type_id,Adoption,TNSA,Adoption Society,Adoption,,FALSE,FALSE,FALSE +32046,1,dsp_times_id,Displine,DSPN,Never,Never,,FALSE,FALSE,FALSE +32047,2,dsp_times_id,Displine,DSP1,1 time,1 time,,FALSE,FALSE,FALSE +32048,3,dsp_times_id,Displine,DSP2,2 times,2 times,,FALSE,FALSE,FALSE +32049,4,dsp_times_id,Displine,DSP3,3 times,3 times,,FALSE,FALSE,FALSE +32050,5,dsp_times_id,Displine,DSP4,4 times,4 times,,FALSE,FALSE,FALSE +32051,6,dsp_times_id,Displine,DSP5,5 times,5 times,,FALSE,FALSE,FALSE +32052,7,dsp_times_id,Displine,DSP6,6 times,6 times,,FALSE,FALSE,FALSE +32053,8,dsp_times_id,Displine,DSP7,7 times,7 times,,FALSE,FALSE,FALSE +32054,9,dsp_times_id,Displine,DSP8,8 times,8 times,,FALSE,FALSE,FALSE +32055,1,feeling_sad_id,Feeling_Sad,FSD1,Rarely or none of the time less than 1 day,Rarely,,FALSE,FALSE,FALSE +32056,2,feeling_sad_id,Feeling_Sad,FSD2,Some or a little of the time (1-2 days),Some,,FALSE,FALSE,FALSE +32057,3,feeling_sad_id,Feeling_Sad,FSD3,Occasionally or a moderate amount of time (3-4 days),Occassionally,,FALSE,FALSE,FALSE +32058,4,feeling_sad_id,Feeling_Sad,FSD4,Most or all of the time (5-7 days),Most,,FALSE,FALSE,FALSE +32059,1,my_behaviour_id,Behaviour,MBHV1,Not true,Not true,,FALSE,FALSE,FALSE +32060,2,my_behaviour_id,Behaviour,MBHV2,Somewhat true,Somewhat true,,FALSE,FALSE,FALSE +32061,3,my_behaviour_id,Behaviour,MBHV3,Very true,Very true,,FALSE,FALSE,FALSE +32062,1,relationship_caregiver_id,Relationship_caregiver,RTN1,Never,Never,,FALSE,FALSE,FALSE +32063,2,relationship_caregiver_id,Relationship_caregiver,RTN2,Almost never,Almost never,,FALSE,FALSE,FALSE +32064,3,relationship_caregiver_id,Relationship_caregiver,RTN3,Sometimes,Sometimes,,FALSE,FALSE,FALSE +32065,4,relationship_caregiver_id,Relationship_caregiver,RTN4,Often,Often,,FALSE,FALSE,FALSE +32066,5,relationship_caregiver_id,Relationship_caregiver,RTN5,Always,Always,,FALSE,FALSE,FALSE +32067,1,father_mortality_id,Father_mortality,FMT1,Yes,Yes,,FALSE,FALSE,FALSE +32068,2,father_mortality_id,Father_mortality,FMT2,"No, he passed away","No, he passed away",,FALSE,FALSE,FALSE +32069,3,father_mortality_id,Father_mortality,FMT3,"No, he lives elsewhere","No, he lives elsewhere",,FALSE,FALSE,FALSE +32070,4,mother_mortality_id,Mother_mortality,MMT1,Yes,Yes,,FALSE,FALSE,FALSE +32071,5,mother_mortality_id,Mother_mortality,MMT2,"No, she passed away","No, she passed away",,FALSE,FALSE,FALSE +32072,6,mother_mortality_id,Mother_mortality,MMT3,"No, she lives elsewhere","No, she lives elsewhere",,FALSE,FALSE,FALSE +32073,1,literacy_lvl_id,Literacy_lvl,LIT1,Cannot read at all,Cannot read at all,,FALSE,FALSE,FALSE +32074,2,literacy_lvl_id,Literacy_lvl,LIT2,Can read but with lots of difficulty,Can read but with lots of difficulty,,FALSE,FALSE,FALSE +32075,3,literacy_lvl_id,Literacy_lvl,LIT3,Can read with a little difficulty,Can read with a little difficulty,,FALSE,FALSE,FALSE +32076,4,literacy_lvl_id,Literacy_lvl,LIT4,Can read easily,Can read easily,,FALSE,FALSE,FALSE +32077,1,under_care_id,Under_care,UCR,No,No,,FALSE,FALSE,FALSE +32078,2,under_care_id,Under_care,UCR1,"Yes, all of them",Yes,,FALSE,FALSE,FALSE +32079,3,under_care_id,Under_care,UCR2,"Yes, some of them","Yes, some of them",,FALSE,FALSE,FALSE +32080,1,employed_id,employed,EMP,"No, self-employed","No, self-employed",,FALSE,FALSE,FALSE +32081,2,employed_id,employed,EMP1,"Yes, self-employed","Yes, self-employed",,FALSE,FALSE,FALSE +32082,3,employed_id,employed,EMP2,"Yes, employed full-time","Yes, employed full-time",,FALSE,FALSE,FALSE +32083,4,employed_id,employed,EMP3,"Yes, employed part-time","Yes, employed part-time",,FALSE,FALSE,FALSE +32084,1,programme_id,programmme,PROG,pre-programme(before implementation),pre-programme,,FALSE,FALSE,FALSE +32085,2,programme_id,programmme,PROG1,post-programme(after implementation),post-programme,,FALSE,FALSE,FALSE +32086,1,agree_id,agree_to,AGR,Strongly agree,Strongly agree,,FALSE,FALSE,FALSE +32087,2,agree_id,agree_to,AGR1,Disagree,Disagree,,FALSE,FALSE,FALSE +32088,3,agree_id,agree_to,AGR2,Not sure,Not sure,,FALSE,FALSE,FALSE +32089,4,agree_id,agree_to,AGR3,Agree,Agree,,FALSE,FALSE,FALSE +32090,5,agree_id,agree_to,AGR4,Strongly agree,Strongly agree,,FALSE,FALSE,FALSE +32091,1,often_id,how_often,FTN,Never,Never,,FALSE,FALSE,FALSE +32092,2,often_id,how_often,FTN1,Rarely,Rarely,,FALSE,FALSE,FALSE +32093,3,often_id,how_often,FTN2,Sometimes,Sometimes,,FALSE,FALSE,FALSE +32094,4,often_id,how_often,FTN3,Often,Often,,FALSE,FALSE,FALSE \ No newline at end of file diff --git a/scripts/teen_doc_csv.csv.json b/scripts/teen_doc_csv.csv.json new file mode 100644 index 000000000..f1b81c4d5 --- /dev/null +++ b/scripts/teen_doc_csv.csv.json @@ -0,0 +1,802 @@ +[ + { + "pk": 32045, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "adoption_unit_type_id", + "item_category": "Adoption", + "item_id": "TNSA", + "item_description": "Adoption Society", + "item_description_short": "Adoption", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32046, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSPN", + "item_description": "Never", + "item_description_short": "Never", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32047, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSP1", + "item_description": "1 time", + "item_description_short": "1 time", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32048, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSP2", + "item_description": "2 times", + "item_description_short": "2 times", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32049, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 4, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSP3", + "item_description": "3 times", + "item_description_short": "3 times", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32050, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 5, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSP4", + "item_description": "4 times", + "item_description_short": "4 times", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32051, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 6, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSP5", + "item_description": "5 times", + "item_description_short": "5 times", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32052, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 7, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSP6", + "item_description": "6 times", + "item_description_short": "6 times", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32053, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 8, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSP7", + "item_description": "7 times", + "item_description_short": "7 times", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32054, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 9, + "field_name": "dsp_times_id", + "item_category": "Displine", + "item_id": "DSP8", + "item_description": "8 times", + "item_description_short": "8 times", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32055, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "feeling_sad_id", + "item_category": "Feeling_Sad", + "item_id": "FSD1", + "item_description": "Rarely or none of the time less than 1 day", + "item_description_short": "Rarely", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32056, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "feeling_sad_id", + "item_category": "Feeling_Sad", + "item_id": "FSD2", + "item_description": "Some or a little of the time (1-2 days)", + "item_description_short": "Some", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32057, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "feeling_sad_id", + "item_category": "Feeling_Sad", + "item_id": "FSD3", + "item_description": "Occasionally or a moderate amount of time (3-4 days)", + "item_description_short": "Occassionally", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32058, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 4, + "field_name": "feeling_sad_id", + "item_category": "Feeling_Sad", + "item_id": "FSD4", + "item_description": "Most or all of the time (5-7 days)", + "item_description_short": "Most", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32059, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "my_behaviour_id", + "item_category": "Behaviour", + "item_id": "MBHV1", + "item_description": "Not true", + "item_description_short": "Not true", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32060, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "my_behaviour_id", + "item_category": "Behaviour", + "item_id": "MBHV2", + "item_description": "Somewhat true", + "item_description_short": "Somewhat true", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32061, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "my_behaviour_id", + "item_category": "Behaviour", + "item_id": "MBHV3", + "item_description": "Very true", + "item_description_short": "Very true", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32062, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "relationship_caregiver_id", + "item_category": "Relationship_caregiver", + "item_id": "RTN1", + "item_description": "Never", + "item_description_short": "Never", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32063, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "relationship_caregiver_id", + "item_category": "Relationship_caregiver", + "item_id": "RTN2", + "item_description": "Almost never", + "item_description_short": "Almost never", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32064, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "relationship_caregiver_id", + "item_category": "Relationship_caregiver", + "item_id": "RTN3", + "item_description": "Sometimes", + "item_description_short": "Sometimes", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32065, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 4, + "field_name": "relationship_caregiver_id", + "item_category": "Relationship_caregiver", + "item_id": "RTN4", + "item_description": "Often", + "item_description_short": "Often", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32066, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 5, + "field_name": "relationship_caregiver_id", + "item_category": "Relationship_caregiver", + "item_id": "RTN5", + "item_description": "Always", + "item_description_short": "Always", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32067, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "father_mortality_id", + "item_category": "Father_mortality", + "item_id": "FMT1", + "item_description": "Yes", + "item_description_short": "Yes", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32068, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "father_mortality_id", + "item_category": "Father_mortality", + "item_id": "FMT2", + "item_description": "No, he passed away", + "item_description_short": "No, he passed away", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32069, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "father_mortality_id", + "item_category": "Father_mortality", + "item_id": "FMT3", + "item_description": "No, he lives elsewhere", + "item_description_short": "No, he lives elsewhere", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32070, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 4, + "field_name": "mother_mortality_id", + "item_category": "Mother_mortality", + "item_id": "MMT1", + "item_description": "Yes", + "item_description_short": "Yes", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32071, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 5, + "field_name": "mother_mortality_id", + "item_category": "Mother_mortality", + "item_id": "MMT2", + "item_description": "No, she passed away", + "item_description_short": "No, she passed away", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32072, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 6, + "field_name": "mother_mortality_id", + "item_category": "Mother_mortality", + "item_id": "MMT3", + "item_description": "No, she lives elsewhere", + "item_description_short": "No, she lives elsewhere", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32073, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "literacy_lvl_id", + "item_category": "Literacy_lvl", + "item_id": "LIT1", + "item_description": "Cannot read at all", + "item_description_short": "Cannot read at all", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32074, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "literacy_lvl_id", + "item_category": "Literacy_lvl", + "item_id": "LIT2", + "item_description": "Can read but with lots of difficulty", + "item_description_short": "Difficulty reading", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32075, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "literacy_lvl_id", + "item_category": "Literacy_lvl", + "item_id": "LIT3", + "item_description": "Can read with a little difficulty", + "item_description_short": "Difficulty reading", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32076, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 4, + "field_name": "literacy_lvl_id", + "item_category": "Literacy_lvl", + "item_id": "LIT4", + "item_description": "Can read easily", + "item_description_short": "Can read easily", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32077, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "under_care_id", + "item_category": "Under_care", + "item_id": "UCR", + "item_description": "No", + "item_description_short": "No", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32078, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "under_care_id", + "item_category": "Under_care", + "item_id": "UCR1", + "item_description": "Yes, all of them", + "item_description_short": "Yes", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32079, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "under_care_id", + "item_category": "Under_care", + "item_id": "UCR2", + "item_description": "Yes, some of them", + "item_description_short": "Yes, some of them", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32080, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "employed_id", + "item_category": "employed", + "item_id": "EMP", + "item_description": "No, self-employed", + "item_description_short": "No, self-employed", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32081, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "employed_id", + "item_category": "employed", + "item_id": "EMP1", + "item_description": "Yes, self-employed", + "item_description_short": "Yes, self-employed", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32082, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "employed_id", + "item_category": "employed", + "item_id": "EMP2", + "item_description": "Yes, employed full-time", + "item_description_short": "Yes, employed full-time", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32083, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 4, + "field_name": "employed_id", + "item_category": "employed", + "item_id": "EMP3", + "item_description": "Yes, employed part-time", + "item_description_short": "Yes, employed part-time", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32084, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "programme_id", + "item_category": "programmme", + "item_id": "PROG", + "item_description": "pre-programme(before implementation)", + "item_description_short": "pre-programme", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32085, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "programme_id", + "item_category": "programmme", + "item_id": "PROG1", + "item_description": "post-programme(after implementation)", + "item_description_short": "post-programme", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32086, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "agree_id", + "item_category": "agree_to", + "item_id": "AGR", + "item_description": "Strongly agree", + "item_description_short": "Strongly agree", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32087, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "agree_id", + "item_category": "agree_to", + "item_id": "AGR1", + "item_description": "Disagree", + "item_description_short": "Disagree", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32088, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "agree_id", + "item_category": "agree_to", + "item_id": "AGR2", + "item_description": "Not sure", + "item_description_short": "Not sure", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32089, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 4, + "field_name": "agree_id", + "item_category": "agree_to", + "item_id": "AGR3", + "item_description": "Agree", + "item_description_short": "Agree", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32090, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 5, + "field_name": "agree_id", + "item_category": "agree_to", + "item_id": "AGR4", + "item_description": "Strongly agree", + "item_description_short": "Strongly agree", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32091, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 1, + "field_name": "often_id", + "item_category": "how_often", + "item_id": "FTN", + "item_description": "Never", + "item_description_short": "Never", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32092, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 2, + "field_name": "often_id", + "item_category": "how_often", + "item_id": "FTN1", + "item_description": "Rarely", + "item_description_short": "Rarely", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32093, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 3, + "field_name": "often_id", + "item_category": "how_often", + "item_id": "FTN2", + "item_description": "Sometimes", + "item_description_short": "Sometimes", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + }, + { + "pk": 32094, + "model": "cpovc_main.SetupList", + "fields": { + "the_order": 4, + "field_name": "often_id", + "item_category": "how_often", + "item_id": "FTN3", + "item_description": "Often", + "item_description_short": "Often", + "item_sub_category": "", + "user_configurable": false, + "sms_keyword": false, + "is_void": false + } + } +] \ No newline at end of file diff --git a/static/plugins-/parsley/dist/parsley-.js b/static/plugins-/parsley/dist/parsley-.js old mode 100755 new mode 100644 diff --git a/static/plugins-/parsley/dist/parsley.min.js b/static/plugins-/parsley/dist/parsley.min.js old mode 100755 new mode 100644 diff --git a/static/plugins-/parsley/dist/parsley.remote.js b/static/plugins-/parsley/dist/parsley.remote.js old mode 100755 new mode 100644 diff --git a/static/plugins-/parsley/dist/parsley.remote.min.js b/static/plugins-/parsley/dist/parsley.remote.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/API.md b/static/plugins/flot/API.md old mode 100755 new mode 100644 diff --git a/static/plugins/flot/CONTRIBUTING.md b/static/plugins/flot/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/static/plugins/flot/FAQ.md b/static/plugins/flot/FAQ.md old mode 100755 new mode 100644 diff --git a/static/plugins/flot/LICENSE.txt b/static/plugins/flot/LICENSE.txt old mode 100755 new mode 100644 diff --git a/static/plugins/flot/Makefile b/static/plugins/flot/Makefile old mode 100755 new mode 100644 diff --git a/static/plugins/flot/NEWS.md b/static/plugins/flot/NEWS.md old mode 100755 new mode 100644 diff --git a/static/plugins/flot/PLUGINS.md b/static/plugins/flot/PLUGINS.md old mode 100755 new mode 100644 diff --git a/static/plugins/flot/README.md b/static/plugins/flot/README.md old mode 100755 new mode 100644 diff --git a/static/plugins/flot/curvedLines.js b/static/plugins/flot/curvedLines.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/excanvas.js b/static/plugins/flot/excanvas.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/excanvas.min.js b/static/plugins/flot/excanvas.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.colorhelpers.js b/static/plugins/flot/jquery.colorhelpers.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.colorhelpers.min.js b/static/plugins/flot/jquery.colorhelpers.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.canvas.js b/static/plugins/flot/jquery.flot.canvas.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.canvas.min.js b/static/plugins/flot/jquery.flot.canvas.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.categories.js b/static/plugins/flot/jquery.flot.categories.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.categories.min.js b/static/plugins/flot/jquery.flot.categories.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.crosshair.js b/static/plugins/flot/jquery.flot.crosshair.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.crosshair.min.js b/static/plugins/flot/jquery.flot.crosshair.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.errorbars.js b/static/plugins/flot/jquery.flot.errorbars.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.errorbars.min.js b/static/plugins/flot/jquery.flot.errorbars.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.fillbetween.js b/static/plugins/flot/jquery.flot.fillbetween.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.fillbetween.min.js b/static/plugins/flot/jquery.flot.fillbetween.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.image.js b/static/plugins/flot/jquery.flot.image.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.image.min.js b/static/plugins/flot/jquery.flot.image.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.js b/static/plugins/flot/jquery.flot.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.min.js b/static/plugins/flot/jquery.flot.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.navigate.js b/static/plugins/flot/jquery.flot.navigate.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.navigate.min.js b/static/plugins/flot/jquery.flot.navigate.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.pie.js b/static/plugins/flot/jquery.flot.pie.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.pie.min.js b/static/plugins/flot/jquery.flot.pie.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.resize.js b/static/plugins/flot/jquery.flot.resize.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.resize.min.js b/static/plugins/flot/jquery.flot.resize.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.selection.js b/static/plugins/flot/jquery.flot.selection.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.selection.min.js b/static/plugins/flot/jquery.flot.selection.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.stack.js b/static/plugins/flot/jquery.flot.stack.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.stack.min.js b/static/plugins/flot/jquery.flot.stack.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.symbol.js b/static/plugins/flot/jquery.flot.symbol.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.symbol.min.js b/static/plugins/flot/jquery.flot.symbol.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.threshold.js b/static/plugins/flot/jquery.flot.threshold.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.threshold.min.js b/static/plugins/flot/jquery.flot.threshold.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.time.js b/static/plugins/flot/jquery.flot.time.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.flot.time.min.js b/static/plugins/flot/jquery.flot.time.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.js b/static/plugins/flot/jquery.js old mode 100755 new mode 100644 diff --git a/static/plugins/flot/jquery.min.js b/static/plugins/flot/jquery.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/Gruntfile.js b/static/plugins/parsley/Gruntfile.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/dist/parsley-.js b/static/plugins/parsley/dist/parsley-.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/dist/parsley.min.js b/static/plugins/parsley/dist/parsley.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/dist/parsley.remote.js b/static/plugins/parsley/dist/parsley.remote.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/dist/parsley.remote.min.js b/static/plugins/parsley/dist/parsley.remote.min.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/assets/docs.css b/static/plugins/parsley/doc/assets/docs.css old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/assets/docs.js b/static/plugins/parsley/doc/assets/docs.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/assets/docs.less b/static/plugins/parsley/doc/assets/docs.less old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/assets/help.css b/static/plugins/parsley/doc/assets/help.css old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/assets/help.less b/static/plugins/parsley/doc/assets/help.less old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/download.html b/static/plugins/parsley/doc/download.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/examples.html b/static/plugins/parsley/doc/examples.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/examples/customvalidator.html b/static/plugins/parsley/doc/examples/customvalidator.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/examples/events.html b/static/plugins/parsley/doc/examples/events.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/examples/multisteps.html b/static/plugins/parsley/doc/examples/multisteps.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/examples/simple.html b/static/plugins/parsley/doc/examples/simple.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/help.html b/static/plugins/parsley/doc/help.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/index.html b/static/plugins/parsley/doc/index.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/doc/tests.html b/static/plugins/parsley/doc/tests.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/index.html b/static/plugins/parsley/index.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/config.js b/static/plugins/parsley/src/config.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/extra/plugin/bind.js b/static/plugins/parsley/src/extra/plugin/bind.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/extra/plugin/remote.js b/static/plugins/parsley/src/extra/plugin/remote.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/extra/validator/dateiso.js b/static/plugins/parsley/src/extra/validator/dateiso.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/bg.js b/static/plugins/parsley/src/i18n/bg.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/da.js b/static/plugins/parsley/src/i18n/da.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/de.js b/static/plugins/parsley/src/i18n/de.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/en.extra.js b/static/plugins/parsley/src/i18n/en.extra.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/en.js b/static/plugins/parsley/src/i18n/en.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/es.js b/static/plugins/parsley/src/i18n/es.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/fr.extra.js b/static/plugins/parsley/src/i18n/fr.extra.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/fr.js b/static/plugins/parsley/src/i18n/fr.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/he.extra.js b/static/plugins/parsley/src/i18n/he.extra.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/he.js b/static/plugins/parsley/src/i18n/he.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/id.js b/static/plugins/parsley/src/i18n/id.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/it.extra.js b/static/plugins/parsley/src/i18n/it.extra.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/it.js b/static/plugins/parsley/src/i18n/it.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/ja.js b/static/plugins/parsley/src/i18n/ja.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/nl.js b/static/plugins/parsley/src/i18n/nl.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/pl.js b/static/plugins/parsley/src/i18n/pl.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/pt-br.js b/static/plugins/parsley/src/i18n/pt-br.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/ru.js b/static/plugins/parsley/src/i18n/ru.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/sv.extra.js b/static/plugins/parsley/src/i18n/sv.extra.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/sv.js b/static/plugins/parsley/src/i18n/sv.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/zh_cn.extra.js b/static/plugins/parsley/src/i18n/zh_cn.extra.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/i18n/zh_cn.js b/static/plugins/parsley/src/i18n/zh_cn.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/main.js b/static/plugins/parsley/src/main.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley.css b/static/plugins/parsley/src/parsley.css old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley.js b/static/plugins/parsley/src/parsley.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/abstract.js b/static/plugins/parsley/src/parsley/abstract.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/defaults.js b/static/plugins/parsley/src/parsley/defaults.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/factory/constraint.js b/static/plugins/parsley/src/parsley/factory/constraint.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/factory/options.js b/static/plugins/parsley/src/parsley/factory/options.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/field.js b/static/plugins/parsley/src/parsley/field.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/form.js b/static/plugins/parsley/src/parsley/form.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/multiple.js b/static/plugins/parsley/src/parsley/multiple.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/pubsub.js b/static/plugins/parsley/src/parsley/pubsub.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/ui.js b/static/plugins/parsley/src/parsley/ui.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/utils.js b/static/plugins/parsley/src/parsley/utils.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/parsley/validator.js b/static/plugins/parsley/src/parsley/validator.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/wrap/append.js b/static/plugins/parsley/src/wrap/append.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/src/wrap/prepend.js b/static/plugins/parsley/src/wrap/prepend.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/config.js b/static/plugins/parsley/test/config.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/dev.html b/static/plugins/parsley/test/dev.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/abstract.js b/static/plugins/parsley/test/features/abstract.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/extra.js b/static/plugins/parsley/test/features/extra.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/field.js b/static/plugins/parsley/test/features/field.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/form.js b/static/plugins/parsley/test/features/form.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/multiple.js b/static/plugins/parsley/test/features/multiple.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/options.js b/static/plugins/parsley/test/features/options.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/parsley.js b/static/plugins/parsley/test/features/parsley.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/pubsub.js b/static/plugins/parsley/test/features/pubsub.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/remote.js b/static/plugins/parsley/test/features/remote.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/ui.js b/static/plugins/parsley/test/features/ui.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/utils.js b/static/plugins/parsley/test/features/utils.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/features/validator.js b/static/plugins/parsley/test/features/validator.js old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/index.html b/static/plugins/parsley/test/index.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/standalone.html b/static/plugins/parsley/test/standalone.html old mode 100755 new mode 100644 diff --git a/static/plugins/parsley/test/tests.js b/static/plugins/parsley/test/tests.js old mode 100755 new mode 100644 diff --git a/templates/forms/caregiver_progress_assessment.html b/templates/forms/caregiver_progress_assessment.html new file mode 100644 index 000000000..3e8201132 --- /dev/null +++ b/templates/forms/caregiver_progress_assessment.html @@ -0,0 +1,819 @@ +{% extends 'base.html' %} +{% load app_filters %} +{% load crispy_forms_tags %} +{% load static %} +{% block page_title %}Sinovuyo Preventive Pre and Post Program Assessment Form {% endblock %} +{% block style_code %} + + + + + + + +{% endblock %} + +{% block javascript_code%} +{% endblock javascript_code%} + +{% block primary %} + + +{% if messages %} +{% for message in messages %} +{% if 'error' in message.tags %} +
+ × + +{% else %} +
+ × + +{% endif %} +

{{ message }}

+
+{% endfor %} +{% endif %} + + + + + + + + +

Forms + Sinovuyo Care Giver Preventive Pre and Post Program Assessment Form + {% if edit_form %} + {{care_giver.first_name}} {{care_giver.surname}} | {{ care_giver_gender }} | {{ care_giver.age}} YRS +

+ {%else%} + {%endif%} + + + + + + + + + + + + + +
+ +
+ +
+
+
+
+ + +
+
+
+
+ {% csrf_token %} + + {%if edit_form%} +

+ {% else %} + + +
+ + + + + + + + + + {% endif %} + + {% if edit_form %} +

+ {% else %} + + + + + + {% endif %} + + + + + +

Care giver name: {{care_giver.first_name}} {{care_giver.surname}}

Age: {{care_giver.age}}

Gender: {{care_giver_gender}}

Designation: {{care_giver.designation}}

Type of assessment:

+ {{ form.type_of_assessment }}
Date of assessment:

+ {{ form.date_of_assessment }}
+
+
+
+ +
+ +
+

1. BACKGROUND DETAILS

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1. Can you read? +
+ {{ form.bd_read }} +
+
2. Level Of Education + {{ form.bd_education_level }} +
3. How many biological children do you have staying with you? + {{ form.bd_biological_children }} +
4. How many children who are not your biological children are staying with you? + {{ form.bd_non_biological_children }} +
5. Are there any children aged 6 to 17 years in this household who are not enrolled in + school? + {{ form.bd_children_not_in_school }} +
6. Do you have a source of income? + {{ form.bd_source_income }} +
7. Are there other adults in the home that contribute to the household income + {{ form.bd_adults_contribute_hh_income }} +
8. Do the children in the home also contribute to the household income + {{ form.bd_children_contribute_hh_income }} +
9. Are you the biological mother of the teen attending the programme? + {{ form.bd_biological_mother }} +
10. If you are not the biological mother does she live in your household + {{ form.bd_bm_live_hh }} +
11. Are you the biological father of the teen attending the programme? + {{ form.bd_biological_father }} +
12. If you are not the biological father does he live in your household? + {{ form.bd_bf_live_hh}} +
13. In the last month, did your family run out of money for food or essentials such as school fees, + medical expenses, rent expenses, clothes? + {{ form.bd_money_basic_expenses }} +
14. In the last month have there been any arguments in the home with shouting, hitting, sexual + violence or threats + {{ form.bd_violence }} +
15. In the past month has there been an adult who was unwell – in hospital or in bed a lot of the + time + {{ form.bd_adult_unwell }} +
16. In the past month is there a child who has been unwell + {{ form.bd_child_unwell }} +
17. In the past term did any of your children ever had to miss school more than 15 days because + you were unwell? + {{ form.bd_miss_school }} +
18. Are you aware of your HIV status? + {{ form.bd_hiv_status }} +
19. Are you aware of the HIV status of children under your care? + {{ form.bd_children_hiv_status }} +
20. Have you ever discussed HIV prevention/sexual and reproductive health with your children? + {{ form.bd_hiv_prevention }} +
21. Do you at least eat two or more meals a day? + {{ form.bd_two_meals }} +
22. In the past month are there times you and your family have had to go a day or more without + eating a meal because there was no food? + {{ form.bd_missing_meal }} +
+
+

+
+ + +
+
+ +
+

2. MY RELATIONSHIP WITH MY CHILD

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +

 

+
23. Do you spend time with your child to discuss his/her + needs (wishes, aspirations, studies, achievements)? + + {{ form.rc_discuss_child_needs }} +
24. Do you apply any form of discipline to your child if + he/she breaks set family rules? + + {{ form.rc_discipline }} +
25. My child generally tells me when something is + bothering him/her + + {{ form.rc_tells_bothering }} +
26. I involve my child in important decisions of our family + + {{ form.rc_involve_decisions }} +
+
+

+
+
+ +
+

3. MY CHILD’S BEHAVIOUR

+
+ + + + + + + + + + + + + + + +

 

+
27. Your child is generally obedient, usually does what + adults request + {{ form.cb_child_obedient }} +
28. Your child often fights with other children or bullies + them + {{ form.cb_fights_children }} +
+
+

+
+
+ +
+

4. DISCIPLINING MY CHILD

+
+ + + + + + + + + + + + + + + + + + + + +

 

+
29. In the past 4 weeks, how often did you discipline your child by spanking, slapping or hitting with your hand? + + {{ form.dc_often_discipline }} +
30. Can you tell me how many times in the past 4 weeks you used any form of physical discipline with your child? + + {{ form.dc_physical_discipline }} +
31. In the past 4 weeks, how often did you say things about your child that upset him/her? + + {{ form.dc_upset_child }} +
+
+

+
+ + +
+
+ +
+

5. DEALING WITH STRESSFUL LIVES AS PARENTS

+
+ + + + + + + + + + + + + + + + + + + +

 

+
32. Caring for your children sometimes takes more time and energy + than you have to give + + {{ form.sp_caring_energy }} +
33. Your children are a major source of stress in your life + + {{ form.sp_source_stress }} +
34. In order to bring up, raise, or educate a child properly, a child + needs to be physically punished + + {{ form.sp_physical_punish }} +
+
+

+
+ + +
+
+ +
+

6. FEELING SAD

+
+ + + + + + + + + + + + + + + + + + +

 

+
35. How often in the past week have you felt depressed? + {{ form.fs_depressed }} +
36. How often in the past week have you felt that + everything you did was an effort? + {{ form.fs_effort }} +
37. How often in the past week have you felt hopeful for + the future? + {{ form.fs_hopeful }} +
+
+

+
+
+
+ +
+

7. FINANCES

+
+ + + + + + + + + + + + + + +

 

+
38. In the past four weeks how many times have you run + out of money for something important like food or + fuel for cooking? + {{ form.fi_money_important_items}} +
39. In the past four weeks how many times were you + worried about money? + {{ form.fi_worried_money }} +
+
+

+
+
+
+ {% if edit_form %} +
+
+ +
+ + Cancel +
+
+

+
+ {% else %} +
+
+ +
+ + Cancel +
+
+

+
+ {% endif %} +
+
+
+
+
+
+ + + + {% if objects %} +
+
+ + + + + + + + + + + {%for data in objects%} + + + + + + + + + + + + + + + + + + {%endfor%} + +
#Date of AssessmentName of CaregiverAnswersAction
{{loop.index}}{{ data.date_of_assessment }}{{ data.ref_caregiver.first_name }} {{data.ref_caregiver.surname}} +

{{data.type_of_assessment |gen_value:vals}}

+
+

Q1: {{data.bd_read |gen_value:vals}}, + Q2: {{data.bd_education_level |gen_value:vals}}, + Q3: {{data.bd_biological_children |gen_value:vals}}, + Q4: {{data.bd_non_biological_children |gen_value:vals}}, + Q5: {{data.bd_children_not_in_school |gen_value:vals}}, + Q6: {{data.bd_source_income |gen_value:vals}}, + Q7: {{data.bd_adults_contribute_hh_income |gen_value:vals}}, + Q8: {{data.bd_childeren_contribute_hh_income |gen_value:vals}}, + Q9: {{data.bd_biological_mother |gen_value:vals}}, + Q10: {{data.bd_bm_live_hh |gen_value:vals}}, + Q11: {{data.biological_father |gen_value:vals}}, + Q12: {{data.bd_bf_live_hh |gen_value:vals}}, + Q13: {{data.bd_money_basic_expenses |gen_value:vals}}, + Q14: {{data.bd_violence |gen_value:vals}}, + Q15: {{data.bd_adult_unwell |gen_value:vals}}, + Q16: {{data.bd_child_unwell |gen_value:vals}}, + Q17: {{data.bd_miss_school |gen_value:vals}}, + Q18: {{data.bd_hiv_status |gen_value:vals}}, + Q19: {{data.bd_children_hiv_status |gen_value:vals}}, + Q20: {{data.bd_hiv_prevention |gen_value:vals}}, + Q21: {{data.bd_two_meals |gen_value:vals}}, + Q22: {{data.bd_missing_meal |gen_value:vals}}, + Q23: {{data.rc_discuss_child_needs |gen_value:vals}}, + Q24: {{data.rc_discipline |gen_value:vals}}, + Q25: {{data.rc_tells_bothering |gen_value:vals}}, + Q26: {{data.rc_involve_decisions |gen_value:vals}}, + Q27: {{data.cb_child_obedient |gen_value:vals}}, + Q28: {{data.cb_fights_children |gen_value:vals}}, + Q29: {{data.dc_often_discipline |gen_value:vals}}, + Q30: {{data.dc_physical_discipline |gen_value:vals}}, + Q31: {{data.dc_upset_child |gen_value:vals}}, + Q32: {{data.sp_caring_energy |gen_value:vals}}, + Q33: {{data.sp_source_stress |gen_value:vals}}, + Q34: {{data.sp_physical_punish |gen_value:vals}}, + Q35: {{data.fs_depressed |gen_value:vals}}, + Q36: {{data.fs_effort |gen_value:vals}}, + Q37: {{data.fs_hopeful |gen_value:vals}}, + Q38: {{data.fi_money_important_items |gen_value:vals}}, + Q39: {{data.fi_worried_money |gen_value:vals}}

+
+
+
+ + + + + +
+
+ {% else %} +
+

No data available

+
+ {% endif %} +
+ + + + + + +
Revised: 4 May 2022
+ + + + + + + + + + + + + +{% endblock %} + +{% block lazy_javascript_code %} + + + + + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/templates/ovc/view_child.html b/templates/ovc/view_child.html index 994467393..44a8b816c 100644 --- a/templates/ovc/view_child.html +++ b/templates/ovc/view_child.html @@ -415,6 +415,42 @@

Registration details  

+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + {% comment %} Sinovuyo Preventive Pre and Post Program Assessment Form button {% endcomment %} +
+ + + + {% endif %} diff --git a/templates/registry/person_edit.html b/templates/registry/person_edit.html old mode 100755 new mode 100644 diff --git a/templates/registry/person_new.html b/templates/registry/person_new.html old mode 100755 new mode 100644