code: 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);
  
  	}
docs: This method is invoked immediately before storing a new resource, or an update to an existing resource to allow the DAO to ensure that it is valid for persistence. By default, checks for the
  "subsetted" tag and rejects resources which have it. Subclasses should call the superclass implementation to preserve this check.
  
  @param theResource     The resource that is about to be persisted
  @param theEntityToSave TODO