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 12 Current »

You can now restrict registration, MRN and visit sites to the CP sites.

Registration Site

On setting the below-mentioned code block for the registration site, only the CP sites are displayed in the drop-down:

Registration Site
{
   "name" : "cpr.site",
   "caption" : "Registration Site",
   "type" : "dropdown",
   "optional" : true,
   "listSource" : {
     "apiUrl" : "collection-protocols/{{cp.id}}/sites",  // Restricts registration sites to CP sites
     "displayProp" : "name",
     "selectProp" : "name",
     "queryParams" : {
     }
   }
 }

Displayed only sites associated with the 'ABPC' collection protocol:

By default, the registration site only displays CP sites.

MRN Site

Form version v7.2, setting the below-mentioned code block for the MRN site, you can show only the sites associated with that CP:

MRN Site
{
      "name" : "cpr.participant.pmis",
      "type" : "collection",
      "fields" : [ {
        "name" : "siteName",
        "caption" : "Site",
        "type" : "dropdown",
        "multiple" : false,
        "optional" : true,
        "listSource" : {
          "apiUrl" : "collection-protocols/{{cp.id}}/sites",   // Restricts MRN sites to CP sites
          "displayProp" : "name",
          "selectProp" : "name",
          "queryParams" : {
            "dynamic" : {
              "operation" : "op"
            },
            "static" : {
              "resource" : "ParticipantPhi"
            },
            "search" : "name"
          }
        }
      }, {
        "name" : "mrn",
        "caption" : "MRN",
        "type" : "text",
        "optional" : true
      } ]
    },

Displayed only sites associated with the 'ABPC' collection protocol:

Visit Site

In version v7.0, setting the below-mentioned code block for the visit site, you can show only the sites associated with that CP:

Code
{
      "name" : "visit.site",
      "caption" : "Site",
      "type" : "dropdown",
      "multiple" : false,
      "optional" : false,
      "listSource" : {
        "apiUrl" : "collection-protocols/{{cp.id}}/sites", // Restricts visit sites to CP sites
        "displayProp" : "name",
        "selectProp" : "name",
        "queryParams" : {
          "dynamic" : {
            "operation" : "op"
          },
          "search" : "name"
        }
      },
      "showIf" : {
        "op" : "AND",
        "rules" : [ {
          "field" : "visit.status",
          "op" : "!=",
          "value" : "'Missed Collection'"
        } ]
      }
    },

Displayed only sites associated with the 'ABPC' collection protocol:

Example JSON

Download

  • No labels