Skip to content

Instantly share code, notes, and snippets.

View zindel's full-sized avatar

Oleksiy Golovko zindel

  • Prague, The Czech Republic
View GitHub Profile
/do(
$date_collected := today(),
$collected_by := null(),
$volume_amount := null(),
$volume_unit := null(),
$concentration_amount := null(),
$concentration_unit := null(),
$individual := top(todo?id()=$todo).individual,
with($sample_data, do(
$id := insert(sample := {
/test-port:
access: enroll_participants_directly
port:
- entity: todo
select: [individual, code, study_enrollment, requirement]
# select: [individual, code, title, status_deprecated, status, facilitator,
# expected_completion_date, time_period_deprecated, requirement, reason_skipped,
# asset_type, num_required_entries, acquire_channel, other_notes, start_window_visit_date,
upgrade-enrollment:
type: form
entity: study_enrollment
title: Upgrade Enrollment
submit_button: Upgrade
input:
- study_enrollment[has-new-version]
value: |
{
current := top(study_enrollment.filter(id()=$study_enrollment))
edit-visit:
type: edit
entity: visit
input:
- visit
title: Edit Visit
fields:
- value_key: individual
read_only: true
- value_key: time_period
path:
- pick-study:
- view-study:
- edit-study:
- replace: ../../view-study
- view-active-version:
- start-configuration:
- replace: ../view-complete-config-version
- view-complete-config-version:
make:
individual:
- code
- sex:
type: enum
$$study := collection(study),
$study := oneOf(
pick($$study, ...),
add($$study, {
code := field('code'),
title := field('text'),
lab := field(collection(lab)),
study_version := [{
paths:
/with-for-demo:
action:
title: with()/for() demo
type: wizard
path:
- pick-case-type:
- make-individual:
- replace: ../../pick-individual/view-individual
class HandleTable(HandleLocation):
PREFIX = '/table/'
path = '%s**' % PREFIX
def __call__(self, req):
req.path_info_pop()
table = req.path_info_pop()
wizard = get_wizard(table)
if wizard is None: