Exemplo n.º 1
0
        public void RetrieveWebArtifact()
        {
            var wa = new WebResolver();

            var artifact = wa.ResolveByUri("http://test.fhir.org/r2/StructureDefinition/Observation");

            Assert.IsNotNull(artifact);
            Assert.IsTrue(artifact is StructureDefinition);
            Assert.AreEqual("Observation", ((StructureDefinition)artifact).Name);

            Assert.AreEqual("http://test.fhir.org/r2/StructureDefinition/Observation", artifact.GetOrigin());
        }
Exemplo n.º 2
0
        public void RetrieveWebArtifact()
        {
            var wa = new WebResolver();

            var artifact = wa.ResolveByUri("http://fhir2.healthintersections.com.au/open/StructureDefinition/Observation");

            Assert.IsNotNull(artifact);
            Assert.IsTrue(artifact is StructureDefinition);
            Assert.AreEqual("Observation", ((StructureDefinition)artifact).Name);

            var ci = artifact.Annotation<OriginInformation>();
            Assert.AreEqual("http://fhir2.healthintersections.com.au/open/StructureDefinition/Observation", ci.Origin);
        }
Exemplo n.º 3
0
        public void RetrieveWebArtifactCustomFhirClient()
        {
            TestFhirClient client = null;

            var wa = new WebResolver(id => client = new TestFhirClient(id));

            Assert.IsNull(client);

            var artifact = wa.ResolveByUri("http://fhir2.healthintersections.com.au/open/StructureDefinition/Flag");

            Assert.IsNotNull(client);
            Assert.AreEqual(client.Status, 3);

            Assert.IsNotNull(artifact);
            Assert.IsTrue(artifact is StructureDefinition);
            Assert.AreEqual("Flag", ((StructureDefinition)artifact).Name);
        }
Exemplo n.º 4
0
        public void RetrieveWebArtifactCustomFhirClient()
        {
            TestFhirClient client = null;

            var wa = new WebResolver(id => client = new TestFhirClient(id));

            Assert.IsNull(client);

            var artifact = wa.ResolveByUri("http://test.fhir.org/r2/StructureDefinition/Patient");

            Assert.IsNotNull(client);
            Assert.AreEqual(client.Status, 3);

            Assert.IsNotNull(artifact);
            Assert.IsTrue(artifact is StructureDefinition);
            Assert.AreEqual("Patient", ((StructureDefinition)artifact).Name);
        }