.net profile validations FHIR

44 views
Skip to first unread message

pritam malunjkar

unread,
Feb 23, 2023, 4:14:56 AM2/23/23
to FHIR DOTNET
  var source = new CachedResolver(new MultiResolver(new DirectorySource(profileDirectory), ZipSource.CreateValidationSource()));

            var ctx = new ValidationSettings()
            {
                ResourceResolver = source,
                GenerateSnapshot = true,
                EnableXsdValidation = true,
                Trace = true,
                ResolveExternalReferences = true,
            };


            var validator = new Validator(ctx);
            var results = validator.Validate(patient);
            if(!results.Success)
            {
               
                //results = validator.Validate(patient, "https://nrces.in/ndhm/fhir/r4/StructureDefinition/Patient");
                results = validator.Validate(patient, "http://hl7.org/fhir/StructureDefinition/Patient");
                Console.WriteLine(results);
            }


I am getting Error in this --
{"Overall result: FAILURE (2 errors and 0 warnings)\r\n[ERROR] Unable to resolve reference to profile 'http://hl7.org/fhir/StructureDefinition/Patient' (at Patient)\r\n[ERROR] Unable to resolve reference to profile 'http://hl7.org/fhir/StructureDefinition/Patient'' (at Patient)\r\n"}


Kindly Guide me
Reply all
Reply to author
Forward
0 new messages