Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developing a FHIR Server Using C# and MongoDb, Xml and Json Ewout Kramer, Furore

Similar presentations


Presentation on theme: "Developing a FHIR Server Using C# and MongoDb, Xml and Json Ewout Kramer, Furore"— Presentation transcript:

1 Developing a FHIR Server Using C# and MongoDb, Xml and Json Ewout Kramer, Furore

2 Architectural context CDR FHIR REST Comm. Service Comm. Service v3 v2 PHR FHIR VNA FHIR ETL HIS LIMS PACS FHIR Msg Comm. Service Comm. Service DB

3 Solution scenarios Storage Processing FHIR Resource FHIR REST JSON/XML POCO/POJO DBMS ORM FHIR Parser JSON/XML POCO/POJO NoSql (Xml/Json) FHIR Parser JSON/XML NoSql (Json/Xml) FHIR Validator JSON/XML XML NoSql (Json) FHIR Validator

4 Json and Xml Roundtrip? One Two One Not so { B: : c }, C: [ One, Two ], D : One, div : { #text : Not, b : so }

5 FHIR Xml and JSon guidelines MR urn:hl7-org:sid/v oid: Acme Healthcare generated "Person" : { "identifiers" : [ { "identifier" : { "type" : { "code" : "MR", "system" : "urn:hl7-org:sid/v } } } ], "text" : { "status" : "generated", "xhtml" : " Name Peter James Chalmers " }

6 Two ways of storing in MongoDb var database = server.GetDatabase("test"); var collection = database.GetCollection ("entities"); var entity = new Entity { Name = "Tom" }; collection.Insert(entity); var id = entity.Id; BsonDocument nested = new BsonDocument { { "name", "John Doe" }, { "address", new BsonDocument { { "street", "123 Main St." }, { "city", "Centerville" }, { "zip", } } }; collection.Insert(nested);

7 What a detour…. Json -> XML -> Json -> Bson

8

9 ResourceRecord -RecordId, Version -State -CreationDate, Author ResourceRecord -RecordId, Version -State -CreationDate, Author ResourceRecord -RecordId, Version -State -CreationDate, Author Storing a resource as a record ResourceInstance -AsJson(), ToJson(), … -GetElement(), ReplaceElement() -ResourceId, Location, Type FHIR Resource Data (XML)

10

11 How do I do transactions/locking? MongoDB does not use traditional locking or complex transactions with rollback, as it is designed to be lightweight and fast and predictable in its performance. It can be thought of as analogous to the MySQL MyISAM autocommit model. By keeping transaction support extremely simple, performance is enhanced, especially in a system that may run across many servers.

12 Brewers CAP theorem Consistency, Availability and Partition tolerance Pick any two… C AP

13

14

15

16

17 26 th Annual Plenary & Working Group Meeting Sep 9, 2012 to Sep 14, Baltimore, MD (Dutchies take note: September 12 th general elections!) SATURDAY SEPTEMBER 8 th FIRST FHIR CONNECTATHON

18 db.things.find( { x : 3, y : "foo" } ); db.foo.find( { $and: [ { a: { $lt: 10 } }, { a: { $gt: 5 } } ] } )


Download ppt "Developing a FHIR Server Using C# and MongoDb, Xml and Json Ewout Kramer, Furore"

Similar presentations


Ads by Google