General Validations in SHR

SHR validates all encounters that are posted to it. Some kinds of validations are :-

  1. Health Id Validation :

    1. The first validation that happens is to check for the presence of health id in MCI.

    2. A FHIR resource contains many elements where health id of the patient is to be specified. SHR validates if all the resources contain the same health id that was passed against the encounter create/update request. Also the URL that is passed against these should correspond to MCI patient only.

      Examples of patient reference in Encounter
      <Bundle xmlns="http://hl7.org/fhir">
      		...
      	<Composition xmlns="http://hl7.org/fhir">
      			...
      		<subject>
      		    <reference value="http://mcitest.com/api/default/patients/98001008823"/>
          		<display value="98001008823"/>
      		</subject>
      			...
      	</Composition>
      		...
      	<Encounter xmlns="http://hl7.org/fhir">
      			...
      		<patient>
      		    <reference value="http://mcitest.com/api/default/patients/98001008823"/>
      		    <display value="98001008823"/>
      		</patient>
      			...
      	</Encounter>
      		...
      </Bundle>

      These are some example resources where patient is referenced. The URL must correspond to MCI GET Patient API.

  2. Facility ID validation :

    An valid facility must be given in the Encounter which corresponds to a valid facility in Facility Registry for Encounter create/update. This is done via the "serviceProvider" tag in encounter resource. The URL must correspond to Facility Registry Get API.

    Example of Facility reference in Encounter
    <Bundle xmlns="http://hl7.org/fhir">
    		...
    	<Encounter xmlns="http://hl7.org/fhir">
    			...
    		<serviceProvider>
    		    <reference value="http://fr.com/facilities/10019841.json"/>
    		</serviceProvider>
    			...
    	</Encounter>
    		...
    </Bundle>
  3. Provider ID validation :

    An valid provider must be given in the Encounter which corresponds to a valid provider in Provider Registry for Encounter create/update. This is done via the "serviceProvider" tag in encounter resource. The URL must correspond to Provider Registry Get API.

    Example of Provider reference in Encounter
    <Bundle xmlns="http://hl7.org/fhir">
    		...
    	<Encounter xmlns="http://hl7.org/fhir">
    			...
    		<participant>
    		    <individual>
            		<reference value="http://pr.com/providers/24.json"/>
    		    </individual>
    		</participant>
    			...
    	</Encounter>
    		...
    </Bundle>