Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developing a FHIR Server

Similar presentations


Presentation on theme: "Developing a FHIR Server"— Presentation transcript:

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

2 Architectural context
FHIR v3 HIS LIMS PACS v2 PHR Comm. Service ETL FHIR Msg FHIR REST FHIR Use FHIR as the storage to your v2/v3 engine Use FHIR as the exchange language for PHR data Use FHIR as the common language for a Vendor Neutral Archive CDR VNA Comm. Service DB

3 Solution scenarios FHIR Resource 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 FHIR REST Processing Configurability. Recompile versus configure. Storage

4 Json and Xml Roundtrip? <XXX xmlns=“urn:foo”> <B a=“c” />
<C>One</C> <C>Two</C> <D>One</D> <div>Not <b>so</b></div> </XXX> { “B”: { : “c” }, “C”: [ “One”, “Two” ], “D” : “One”, “div” : { “#text” : “Not ”, “b” : “so” }

5 FHIR Xml and JSon guidelines
<Person xmlns=" <identifiers> <identifier> <type> <code>MR</code> <system>urn:hl7-org:sid/v2-0203</system> </type> <identifier> <system>oid: </system> <id>12345</id> </identifier> <assigner> <text>Acme Healthcare</text> </assigner> <period> <low> </low> </period> </identifier> </identifiers> <text> <status>generated</status> <xhtml xmlns=" <table> <tbody> <tr> "Person" : { "identifiers" : [ { "identifier" : { "type" : { "code" : "MR", "system" : "urn:hl7-org:sid/v2-0203“ } } } ], "text" : { "status" : "generated", "xhtml" : "<table><tbody><tr><td>Name</td> <td>Peter James <b>Chalmers</b> </table></tbody></table>"

6 Two ways of storing in MongoDb
var database = server.GetDatabase("test"); var collection = database.GetCollection<Entity>("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 Json -> XML -> Json -> Bson
What a detour…. Json -> XML -> Json -> Bson

8

9 Storing a resource as a record
ResourceRecord RecordId, Version State CreationDate, Author ResourceRecord RecordId, Version State CreationDate, Author ResourceRecord RecordId, Version State CreationDate, Author 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 C A P Brewer’s CAP theorem Consistency, Availability and
Partition tolerance Pick any two… A P

13

14

15

16

17 FIRST FHIR CONNECTATHON
26th Annual Plenary & Working Group Meeting Sep 9, 2012 to Sep 14, 2012 - Baltimore, MD (Dutchies take note: September 12th general elections!) SATURDAY SEPTEMBER 8th 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"

Similar presentations


Ads by Google