docs: protected void validateResourceForStorage(T theResource, ResourceTable theEntityToSave) {
  		Object tag = null;
  
  		int totalMetaCount = 0;
  
  		if (theResource instanceof IResource) {
  			IResource res = (IResource) theResource;
  			TagList tagList = ResourceMetadataKeyEnum.TAG_LIST.get(res);
  			if (tagList != null) {
  				tag = tagList.getTag(Constants.TAG_SUBSETTED_SYSTEM_DSTU3, Constants.TAG_SUBSETTED_CODE);
  				totalMetaCount += tagList.size();
  			}
  			List<IdDt> profileList = ResourceMetadataKeyEnum.PROFILES.get(res);
  			if (profileList != null) {
  				totalMetaCount += profileList.size();
  			}
  		} else {
  			IAnyResource res = (IAnyResource) theResource;
  			tag = res.getMeta().getTag(Constants.TAG_SUBSETTED_SYSTEM_DSTU3, Constants.TAG_SUBSETTED_CODE);
  			totalMetaCount += res.getMeta().getTag().size();
  			totalMetaCount += res.getMeta().getProfile().size();
  			totalMetaCount += res.getMeta().getSecurity().size();
  		}
  
  		if (tag != null) {
  			throw new UnprocessableEntityException("Resource contains the 'subsetted' tag, and must not be stored as it may contain a subset of available data");
  		}
  
  		String resName = getContext().getResourceDefinition(theResource).getName();
  		validateChildReferences(theResource, resName);
  
  		validateMetaCount(totalMetaCount);
  
  	}