本文整理汇总了C#中FhirClient.ValidateResource方法的典型用法代码示例。如果您正苦于以下问题:C# FhirClient.ValidateResource方法的具体用法?C# FhirClient.ValidateResource怎么用?C# FhirClient.ValidateResource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FhirClient
的用法示例。
在下文中一共展示了FhirClient.ValidateResource方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InvokeResourceValidation
[TestMethod]//returns 500: validation of slices is not done yet.
public void InvokeResourceValidation()
{
var client = new FhirClient(testEndpoint);
var pat = client.Read<Patient>("Patient/patient-uslab-example1");
try
{
var vresult = client.ValidateResource(pat, null,
new FhirUri("http://hl7.org/fhir/StructureDefinition/uslab-patient"));
Assert.Fail("Should have resulted in 400");
}
catch(FhirOperationException fe)
{
Assert.AreEqual(System.Net.HttpStatusCode.BadRequest, fe.Status);
Assert.IsTrue(fe.Outcome.Issue.Where(i => i.Severity == OperationOutcome.IssueSeverity.Error).Any());
}
}
示例2: InvokeResourceValidation
[TestMethod,Ignore]//returns 500: validation of slices is not done yet.
public void InvokeResourceValidation()
{
var client = new FhirClient(testEndpoint);
var pat = client.Read<Patient>("Patient/patient-uslab-example1");
var vresult = client.ValidateResource(pat, null,
new FhirUri("http://hl7.org/fhir/StructureDefinition/uslab-patient"));
Assert.IsTrue(vresult.Success());
}
示例3: InvokeResourceValidation
public void InvokeResourceValidation()
{
var client = new FhirClient(testEndpoint);
var pat = client.Read<Patient>("Patient/uslab-example1");
var vresult = client.ValidateResource(pat, null,
new FhirUri("http://fhir-dev.healthintersections.com.au/open/StructureDefinition/patient-uslab-uslabpatient"));
Assert.IsTrue(vresult.Success());
}