Exemple #1
0
        public void Test_Create()
        {
            var createdPatient = (Patient)FHIRbase.Create(SimplePatient);

            Assert.That(createdPatient, Is.Not.Null);
            Assert.That(createdPatient.Id, Is.Not.Null.Or.Empty);
            Assert.That(createdPatient.HasVersionId, Is.True);
            Assert.That(createdPatient.Name.First().Family.First(), Is.EqualTo("Hello"));
            Assert.That(createdPatient.Name.First().Given.First(), Is.EqualTo("World"));
            Assert.That(createdPatient.Telecom.First().Value, Is.EqualTo("123456789"));

            FHIRbase.Delete(createdPatient);

            var createdpatient1 = FHIRbase.Create(CommonPatient);

            Assert.That(createdpatient1, Is.Not.Null);
            Assert.That(createdpatient1.Id, Is.Not.Null.Or.Empty);
            Assert.That(createdpatient1.HasVersionId, Is.True);

            var readCreated = FHIRbase.Read(createdpatient1);

            Assert.That(readCreated, Is.Not.Null);
            Assert.That(readCreated.Id, Is.Not.Null.Or.Empty);
            Assert.That(readCreated.HasVersionId, Is.True);

            FHIRbase.Delete(createdpatient1);
        }