Date post: | 14-Apr-2017 |
Category: |
Healthcare |
Upload: | devdays |
View: | 376 times |
Download: | 2 times |
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
SEARCH for
server developersMartijn Harthoorn
FHIR DevDays 2015November 19, 2015
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
2
Name: Martijn Harthoorn Company: Furore Background:
Programmer in C# (mainly)
Project manager Furore FHIR team Programmer of
Spark Search Engine SIMPLIFIER.NET search engine
Who am I?
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
3
Dealing with what’s behind the question mark.
Search
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
4
"FHIR client should be easy.
FHIR server needs to solve the complex issues."
Search has some…
FHIR paradigm
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
5
Use casesfor a FHIR server
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
6
UC1: The registrar
patient forgot hospital card (with id)
"what is your name and birthdate?"
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
7
UC2: The doctor
“give me all data on patient x”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
8
UC3: The researcher
“give me all data on a specific allergy that conforms to a set of conditions”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
9
UC4: The manager
“how many patients did we treat last month?”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
10
UC5: The lab
“Give me the list of tests to process”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
11
UC6: The nurse
“Alert me on any patient with a measurement in the danger zone.”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
12
UC Summary
- the registrar - the doctor - the researcher - the manager - the lab worker - the nurse
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
13
Do what?
Do what?
Search Query
"Give me your top results." "Give me exactly what I ask"
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
14
Build upon REST
Do what?
Search Query
URL/[resource]?<parameters>
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
15
Where do we stand?
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
16
Types
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
17
FHIR Data types
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
18
Search parameters types
number
date
string
token
reference
quantity
uri
composite
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
19
Mapping of number
number integer
Parameter data type Content data type
~/Procedure?date=>2010-01-01&date=<2011-12-31
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
20
Mapping of date
dateDate
Parameter data type Content data type
Period
~/Procedure?date=>2010-01-01&date=<2011-12-31
DateTime
Instant
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
21
Mapping of string
stringString
Parameter data type Content data type
HumanName
~/Patient?name=eve
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
22
Mapping of token
tokenCoding
Parameter data type Content data type
Codeable concept
~/Patient?name=eve
Identifier
(Code)
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
23
Mapping of quantity
quantity Quantity
Parameter data type Content data type
~/Patient?name=eve
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
24
Logical operators
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
25
Logical operators
a=x & c=y & e=z
a=x & a=y
a=b,d
a-b=c$d
AND
OR / IN
(nested) AND
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
26
Building an expression tree
URL?a=A&a=A2&c=C1,C2&d-e-=D&E
AND
EQ a=A2
OR
c=C1
c=C2
AND
d=D e=E
a A
ELEM
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
27
Comparison operators
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
28
Logical operators
eqnegtltgele.....
value=le100
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
29
Levels of parameters
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
30
Global parameters:
_id_lastupdated_tag_profile_list, ...
Levels of parameters
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
31
Predefined parameters:
Patient.addressPatient.familyPatient.emailOrganization.nameOrganization.partof...
Levels of parameters
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
32
Profiled parameters:
Patient.mycustomfield...
Levels of parameters
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
33
A small historyHOW WE IMPLEMENTED SPARK reference implementation
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
34
History
Version 1. Patient only Per parameter
No meta data No index
Limited
every change is rework
Slow!!!
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
35
History
Version 2. All resources Self generated meta data
Indexing in Lucene Client side joins
Fast
Lot of work
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
36
History
Version 3.
All resources Model meta data Indexing in Mongo
Even faster!
changes in the standard are now applied automatically
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
37
Indexing
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
38
Indexing
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
39
Indexing
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
40
Indexing
REST Service
Storage
Index&
Search
DB
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
41
How to index?
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
42
How to index?
<family value=“Chalmers”>
chalmers
Patient?name=chal
chal*match
PUT SEARCH
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
43
How to index?
<valueQuantity=“10g”>
0.1
value-quantity=>0.1||kg
0.05>
http://unitsofmeasure.org http://unitsofmeasure.org
kg = kg
=
PUT SEARCH
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
44
Logic and filtering
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
45
_include_revinclude
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
46
Chained parameters
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
47
Paging
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
48
Canonical search
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
49
Canonical search
UCUM
http://unitsofmeasure.org/
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
50
Fuzzy search
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
51
Fuzzy search
1. STARTS WITH
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
52
Fuzzy search
2. LIKE
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
53
Fuzzy search
3. SOUNDEX
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
54
Fuzzy search
4. Damerau-Lehvenstein
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
55
Fuzzy search
5. More advanced searching
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
56
Full text search
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
57
Debugging
To test a client – you must have a tested serverTo test a server – you must have a tested client
“One fool can ask more questions than seven wise men can answer”
© 2014 HL7 ® International. Licensed under Creative Commons. HL7 & Health Level Seven are registered trademarks of Health Level Seven International. Reg. U.S. TM Office.
58
Debugging
“One fool can ask more questions than seven wise men can answer”
Sprinkler(testtool) Spark MongoDB
Visual Studio Visual Studio MongoVue
Fiddler