Ejemplo n.º 1
0
        public OperationOutcome ValidatePatientReference(ResourceReference reference)
        {
            if (!_validationHelper.ValidReference(reference, FhirConstants.SystemPDS))
            {
                return(OperationOutcomeFactory.CreateInvalidResource("subject"));
            }

            var nhsNumber = reference.Reference.Replace(FhirConstants.SystemPDS, "");

            if (!_validationHelper.ValidNhsNumber(nhsNumber))
            {
                return(OperationOutcomeFactory.CreateInvalidNhsNumberRes(nhsNumber));
            }

            return(null);
        }