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

Ability to Capture Questionnaire Launch and Submit Timestamps #2372

Open
qiarie opened this issue Dec 15, 2023 · 7 comments · May be fixed by #2672
Open

Ability to Capture Questionnaire Launch and Submit Timestamps #2372

qiarie opened this issue Dec 15, 2023 · 7 comments · May be fixed by #2672

Comments

@qiarie
Copy link
Collaborator

qiarie commented Dec 15, 2023

Is your feature request related to a problem? Please describe.
We would like to track how long it takes agents in the field to fill out questionnaires. This is for process auditing purposes and to be able to optimise data collection activities and processes.

Describe the solution you'd like

  • Capture the timestamp of when a questionnaire is launched.
  • Capture the timestamp of when a questionnaire is submitted.
  • The timestamps can then be loaded to the questionnaire response for processing post-submit.

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.

Would you like to work on the issue?
Please state if this issue should be assigned to you or who you think could help to solve this issue.

@dubdabasoduba
Copy link
Collaborator

@jingtang10 do you mind looking into this?

@hamza-vd
Copy link

hamza-vd commented Dec 28, 2023

@f-odhiambo cc: @jingtang10
I am picking up this ticket. As discussed I'll be adding two items to QuestionnaireResponse, questionnaire-launch-time and questionnaire-submission-time

@hamza-vd
Copy link

hamza-vd commented Jan 3, 2024

@f-odhiambo cc: @jingtang10 @qiarie

After some discussion and scoping, the following enhancements will be implemented:

  1. Both QuestionnaireResponseItemComponent and QuestionnaireItemComponent will be included at both the launch and submission stages. A sample QuestionnaireResponseItemComponent is illustrated below:
QuestionnaireResponseItemComponent().apply {
    linkId = "submission-timestamp"
    answer = arrayListOf<QuestionnaireResponseItemAnswerComponent?>().apply {
        add(QuestionnaireResponseItemAnswerComponent().apply {
            value = StringType("<timestamp>")
        })
    }
}

  1. The introduced functionality will be configurable.

@hamza-vd
Copy link

hamza-vd commented Jan 4, 2024

A sample QR will look like

{
  "resourceType": "QuestionnaireResponse",
  "item": [
    {
      "linkId": "1",
      "text": "Choose one from the options below",
      "answer": [
        {
          "valueCoding": {
            "code": "option-1",
            "display": "Option 1"
          },
          "item": [
            {
              "linkId": "1-select-one",
              "text": "Select one"
            }
          ]
        }
      ]
    },
    {
      "linkId": "launch-timestamp",
      "answer": [
        {
          "valueString": "2024-01-04T11:39:30.040+05:00"
        }
      ]
    },
    {
      "linkId": "submission-timestamp",
      "answer": [
        {
          "valueString": "2024-01-04T11:41:01.095+05:00"
        }
      ]
    }
  ]
}

@hamza-vd
Copy link

As per the PR comments, there will be a change in the implementation. I will implement the following changes.

  1. The authored field will be used as a submission timestamp.
  2. The launch-timestamp will be added as an extension to the QuestionnaireResponse.

@hamza-vd
Copy link

A new sample implementation

{
  "resourceType": "QuestionnaireResponse",
  "extension": [
    {
      "urI": "launch-timestamp",
      "valueDateTime'": "2024-02-22T15:25:29+05:00"
    }
  ],
  "authored": "2024-02-22715:25:32+05:00",
  "item": []
}

@jingtang10
Copy link
Collaborator

@hamza-vd hamza-vd linked a pull request Sep 12, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
4 participants