Got feedback or spotted a mistake?

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

Restrict Registration, MRN and Visit Sites to CP Sites

By default, MRN and visit sites display all sites available in the system. You can restrict these to show only 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 related to 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 related to the 'ABPC' collection protocol:

Example JSON

Download

Got feedback or spotted a mistake?

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