Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

It is possible to skip the default specimen collection step and navigate to a configurable data entry step directly.

When collecting planned or unplanned samples, you are taken to the below default specimen collection page:

The fields in this page are limited and not configurable. If you don't need all fields on the default collection page, this page can be hidden and directly taken to the configurable data entry page(nth step). This gives more flexibility to add the fields that are required and remove unwanted fields.

Steps to hide default specimen collection page:

Add the below line of code after the fieldGroups in the specimenCollection section:

<"showCollectionTree" : false>

Example: Below JSON code allows user to hide default specimen collection page and add required fields in the nth step like anatomic site, frozen event etc.

 To add the JSON using the 'REST API Invoker Plugin' from OpenSpecimen, refer to https://openspecimen.atlassian.net/wiki/x/G4DgB.

URLhttp://<host>:<port>/openspecimen/rest/ng/collection-protocols/{id}/workflows
MethodPUT
Requestapplication/json
  • Along with the below code block, having a dictionary section is mandatory which will include definitions for all the fields used in this section.
  • Add the below-mentioned code block in the JSON workflow in the new section "specimenCollection".
Example Code
{
      "name": "specimenCollection",
      "data": {
        "fieldGroups": [
          {
            "title": "Anatomic Site",
            "criteria": {
              "rules": [
                {
                  "field": "specimen.lineage",
                  "op": "==",
                  "value": "'New'"
                }
              ]
            },
            "fields": [
              {
                "name": "specimen.label",
                "baseField": "specimen.label",
                "type": "span"
              },
              {
                "name": "specimen.anatomicSite",
                "baseField": "specimen.anatomicSite"
              },
              {
                "name": "specimen.laterality",
                "baseField": "specimen.laterality"
              }
            ]
          },
          {
            "title": "Spun Event for Blood Specimens",
            "criteria": {
              "op": "AND",
              "rules": [
                {
                  "field": "specimen.type",
                  "op": "==",
                  "value": "'Whole Blood'"
                },
                {
                  "field": "specimen.lineage",
                  "op": "==",
                  "value": "'New'"
                }
              ]
            },
            "fields": [
              {
                "name": "specimen.label",
                "baseField": "specimen.label",
                "type": "span"
              },
              {
                "name": "events.SpecimenSpunEvent.user",
                "baseField": "specimen.events.SpecimenSpunEvent.user"
              },
              {
                "name": "events.SpecimenSpunEvent.time",
                "baseField": "specimen.events.SpecimenSpunEvent.time"
              },
              {
                "name": "events.SpecimenSpunEvent.gForce",
                "baseField": "specimen.events.SpecimenSpunEvent.gForce"
              },
              {
                "name": "events.SpecimenSpunEvent.duration",
                "baseField": "specimen.events.SpecimenSpunEvent.duration"
              },
              {
                "name": "events.SpecimenSpunEvent.comments",
                "baseField": "specimen.events.SpecimenSpunEvent.comments"
              }
            ]
          },
          {
            "title": "Events for Frozen Tissue",
            "criteria": {
              "op": "AND",
              "rules": [
                {
                  "field": "specimen.lineage",
                  "op": "==",
                  "value": "'New'"
                },
                {
                  "field": "specimen.type",
                  "op": "==",
                  "value": "'Frozen Tissue'"
                }
              ]
            },
            "fields": [
              {
                "name": "specimen.label",
                "baseField": "specimen.label",
                "type": "span"
              },
              {
                "name": "events.SpecimenCheckInCheckOutEvent.status",
                "baseField": "specimen.events.SpecimenCheckInCheckOutEvent.status"
              },
              {
                "name": "events.SpecimenCheckInCheckOutEvent.user",
                "baseField": "specimen.events.SpecimenCheckInCheckOutEvent.user"
              },
              {
                "name": "events.SpecimenCheckInCheckOutEvent.time",
                "baseField": "specimen.events.SpecimenCheckInCheckOutEvent.time"
              },
              {
                "name": "events.SpecimenFrozenEvent.time",
                "baseField": "specimen.events.SpecimenFrozenEvent.time"
              },
              {
                "name": "events.SpecimenFrozenEvent.user",
                "baseField": "specimen.events.SpecimenFrozenEvent.user"
              },
              {
                "name": "events.SpecimenFrozenEvent.frozenMethod",
                "baseField": "specimen.events.SpecimenFrozenEvent.frozenMethod"
              }

            ]
          }
        ],
      "showCollectionTree" : false
      }
}

When you click on the collect specimens from visit overview, it'll directly take you to the below page.

Example JSON

Download

  • No labels