Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write aRMT protocols in app config service #19

Open
blootsvoets opened this issue Jun 22, 2021 · 1 comment
Open

Write aRMT protocols in app config service #19

blootsvoets opened this issue Jun 22, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@blootsvoets
Copy link
Collaborator

blootsvoets commented Jun 22, 2021

This could be a JSON editor at first, and possibly a fully-fledged form at a later stage. Protocols should be available at least on a project-level, but perhaps it could even be supported on every level (global, project, user).

@blootsvoets
Copy link
Collaborator Author

Possible API:

Get/set the protocol for a given user:

/projects/{projectId}/users/{userId}/protocol/{clientId}
---
{
  "version": "0.1.1",
  "schemaVersion": "0.1.0",
  "name": "test",
  "healthIssues": [
    "general"
  ],
  "protocols": [
    {
      "name": "test",
      "showIntroduction": false,
      "questionnaire": {
        "repository": "https://my-url",
        "name": "test",
        "avsc": "questionnaire"
      },
      "startText": {
        "en": "Time for a new questionnaire!",
        "nl": "Tijd voor een nieuwe vragenlijst!",
      },
      "endText": {
        "en": "Thanks for filling this out!",
        "nl": "Bedankt voor het invullen!",
      },
      "estimatedCompletionTime": 10,
      "protocol": {
        "repeatProtocol": {
          "unit": "year",
          "amount": 9999
        },
        "repeatQuestionnaire": {
          "unit": "min",
          "unitsFromZero": [
            482	
          ]
        },
        "completionWindow": {
          "unit": "min",
          "amount": 10
        }
      }
    }
  ]
}

And likewise, on the project level /projects/{projectId}/protocol/{clientId} and on the global level /global/protocol/{clientId}.

Get/set the JSON schema for a given client

GET /global/protocol/{clientId}/schema
---
HTTP 200 OK
{
    ... json schema ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant