`
`USUtlt'id-Ul 138131
`
`(12) United States Patent
`US 6,401,138 B1
`(10) Patent N0.:
`
`(45) Date of Patent: Jun. 4, 2002
`Judge et al.
`
`(54)
`
`INTERFACE FOR I’A’I‘IENT CONTEXT
`SHARING AND APPLICATION SWITCHING
`
`(75)
`
`Inventors: Frank Judge, Lawrence; Howard
`Sumner, Redford; Andrew Scott
`Braunstein. Brookline, all of MA (US)
`
`(73) Assignee: Koninklljke Philips Electronics N.V.,
`Ei ndhoven (NL)
`
`( * ) Notice:
`
`Subject to any disclaimer, the term of this
`patent is extended or adjusted under 35
`use. 154(b) by 47 days.
`
`(21) Appl. No.: 08;"739,087
`
`(22
`
`Fited:
`
`Oct. 28, 1996
`
`Int. Cl.7
`(51)
`(52) U.S. Cl.
`
`Gflfil' 9t54
`709t328 7(19’l08 Ttl9t'3t3;
`709818; T059; 7055
`..
`.395t680, 684;
`(58) Field of Search
`7(8)t3(lt),1[l8,302,318 328; 70522, 3.
`l, 500
`
`(56)
`
`References Cited
`US. PATENT DOCUMENTS
`
`(TANG) Tang, RC. “
`Semantic integration of information in
`abstract, Feb. [9943“
`a physician’s. workstation".
`
`(MICROSOFT) Microsoft Press.
`Reference" vol. One, 9. 15. 1994*
`
`“OLE 2 Programmer‘s
`
`(PERSON) Person, Ron. "Using Windows 95“ pp. 24, 6t},
`1995*
`
`Arora Shall. “Object—Oriented Technology for Health Care
`and Medical Information Systems". Oct. 1995*
`Microsoft Online Documentation. “
`Embedded Ohjects".*
`
`Contrasting Linked and
`
`"Semantic integration ofinformation in a physician’s work-
`station", 'l‘ang, et at; International Journal of Bio—Medical
`Computing 35 (1994) 47—60.
`
`* cited by examiner
`
`Primary Examiner—St. John Courtenay, III
`Assistant Examiner—Lewis A. Bullock, Jr.
`
`(57)
`
`ABSTRACT
`
`In a medical information system, a facility is provided so
`that different application programs can share information
`about their current state, so that a user of these applications
`can move more efficiently among them. This facility
`includes a patient context interface (PCI) that each applica-
`tion can access by means of an application programming
`interface {API). This API provides mechanisms by which
`applications can register their identity and their interest in
`certain types of data and events. The PC] stores data
`received from applications [or sharing with other
`applications, and the PCI notifies certain applications of
`evean received from other applications. In operation, an
`application that is used to review data for a patient stores (in
`the PCI) an identification of the patient whose data is
`currently being reviewed, and another application retrieves
`(from the PCI) that patient
`identification so that
`it can
`automatically present
`that patient‘s data when the user
`switches to that application. In addition, an application can
`retrieve the names of other appiications and can present
`these names to a user, so that the user can switch to one of
`those applications to review data thatis related to data that
`the user is revtewrng in the Itrst application (e. g. data about
`the same patient).
`
`6 Claims, 15 Drawing Sheets
`
`.
`
`5,226,“? A * W1993 Miklos
`5,345,551 A "
`‘Jt’lfiI‘Jét Shelley ct al.
`5,448,?38 A " WISH-'5
`(iood cl al.
`5386,61? A * U1996 Stun: et al.
`5,530,865 A *
`oil‘J‘JfJ Owens ct al.
`S 546 ,580 A *
`8t1996 Seliger ct at.
`5592664 A t
`”1997 Starkey
`5,664,202? A *
`FIJ'I‘JQ? Crumpier etal
`5,666,492 A "
`9,?1097 Rhodes et al.
`.
`5352.150 A * Straits l-‘austetal.
`5,835,089 A *
`towns Skarho ctal
`33,862,376T A "'
`[£1999 Lee
`5,946,659 A *
`$1999 Lancelot ct al.
`FOREIGN PATENT DOCUMENTS
`
`..
`.
`
`
`
`3453853
`345t’8t’l4
`309L329
`1091315
`.. T093313
`.. TUWB
`.. mm
`345N353
`... 705i?
`nanny.
`345ml
`. "i09t329
`. 105:2
`
`EP
`
`0713178 A1 "‘
`
`5f1996
`
`.. GOGFIQHfi
`
`OTI IER PUBLICATIONS
`
`Douglass. A. Young. "XWindow Systems Programming and
`Applications with X1", 1989 “
`Stimson, Craig. “Running WintloWsB.1”, 1992.*
`
`
`
`
`
`001
`
`APL1071
`
`Apple V. Valencell
`
`IPR2017-00321
`
`APL1071
`Apple v. Valencell
`IPR2017-00321
`
`001
`
`
`
`US. Patent
`
`Jun. 4, 2002
`
`Sheet 1 0f 15
`
`US 6,401,138 B1
`
`50
`
`
`
`
`Application
`A
`(32 Bit)
`
`
`5
`
`2
`
`
`
`Application
`B
`(16 Bit)
`
`
`60
`
`60
`
`PCI 1 6.DLL
`
`62
`
`70
`
`56
`
`58
`
`PCI.DLL
`
`5
`
`55
`
`7
`
`Shared
`Memory
`
`64
`
`FIG.1
`
`002
`
`002
`
`
`
`US. Patent
`
`Jun. 4, 2002
`
`Sheet 2 0f 15
`
`US 6,401,138 B1
`
`1 10
`
`116
`
`118
`
`112
`
`>J—_ "Has A" relationship
`
`114
`
`>—LE— 1*to-Many "Has A"
`
`relationship
`
`Class member variable
`
`Class method (function)
`
`FIG.2
`
`003
`
`003
`
`
`
`US. Patent
`
`Jun. 4, 2002
`
`Sheet 3 0f 15
`
`US 6,401,138 B1
`
`PCLEventUserC
`
`140
`
`134
`
`
`v
`
`
`_ PCLAppIicationC
`
`PCLEventC
`
`PCI_PCIC
`
`FIG.3
`
`004
`
`004
`
`
`
`US. Patent
`
`Jun. 4, 2002
`
`Sheet 4 0f 15
`
`US 6,401,138 B1
`
`EN
`
`EN
`
`in
`
`em
`
`ownm5
`
`Nam
`
`3m
`
`oflcmfifimfifi
`
`Cofloeofiae
`
`egg
`
`005th
`
`02on
`
`oaafiflmaecs
`
`Omaggofifl
`
`032.8%?
`
`w?
`
`v.0:
`
`o_on_l_on_
`
`2233938
`
`Bcgmlam
`
`03815.;
`
`can
`
`umm
`
`EN
`
`005
`
`005
`
`
`
`
`
`
`US. Patent
`
`Jun. 4, 2002
`
`Sheet 5 0f 15
`
`US 6,401,138 B1
`
`95
`
`New
`
`3m
`
`3N
`
`ma
`
`ossug
`
`055%.”
`
`0253:
`
`€8.25:
`
`952
`
`ofisofiafig
`
`o:
`
`m.o_.._
`
`Bcgmlan.
`
`02°ng
`
`can
`
`mom
`
`
`
`238054825
`
`
`
`28ng01030
`
`
`
`BEEJtaco
`
`3:38.0433
`
`
`
`Befigzfimagi:
`
`
`
`Haggai592%
`
`
`
`alommEIrogoaal
`
`an
`
`EN
`
`mmm
`
`mmm
`
`8N
`
`New
`
`vow
`
`can
`
`006
`
`006
`
`
`
`
`
`
`
`
`
`
`US 6,401,138 B1
`
`mon
`
`E
`
`©.o_.._
`
`US. Patent
`
`U
`
`
`
` agM5NMNOOH—ODIGn—Du—OfllmDucal—On—DEN
`
`12m053548E
`
`
`007
`
`007
`
`
`
`
`
`US. Patent
`
`Jun. 4, 2002
`
`Sheet 7 of 15
`
`US 6,401,138 B1
`
`«mm
`
`wwm
`
`mmm
`
`mmm
`
`omm
`
`$39528
`
`06323
`
`a?
`
`G:2§__§._8§§
`
`9.2%:>
`
`0&6:o“m6;
`
`cm)I
`
`
`
`254#8548am
`
`008
`
`
`
`
`
`mafiJmafia—glamNam
`
`m.oE
`
`
`
`N:2325548
`
`
`
`
`
`mol_hmmsmolam«mm
`
`
`
`
`
`EBJbomDEBI—Un—mam
`
`
`
`3&5.05332.5“.
`
`8a
`
`008
`
`
`
`
`
`
`US. Patent
`
`J
`
`US 6,401,138 B1
`
`
`
`mEgmheto;W008333316;03332?
`
`o=o_§__n_&§_§u_8
`
`
`
`Lmfimum
`523%”?
`
`hfillSno.uon:
`mfilalllvv8:832386
`
`u5E10363°0.8-9
`
`
`
`2383\386mHH,boEm:m.835Quifioenv
`
`
`
`
`
`05:333.?9938.338
`
`
`
`._.5much...mmmoen.
`
`
`
`5333
`
`009
`
`3:
`
`009
`
`
`
`US. Patent
`
`Jun. 4, 2002
`
`Sheet 9 0f 15
`
`US 6,401,138 B1
`
`os_§__&<u_8
`
`
`
`ooucolam06¢le
`
`.2301
`
`£82.52
`
`:2.:€05
`
`38to:385
`NH
` 02.55208
`EB5360:
`28Ewan”—
`
`95920348
`
`389503
`
`canon?
`
`
`
`32348
`
`2583%Us
`
`958
`
`2!2.BugRE
`
`m.o_.._
`
`010
`
`010
`
`
`
`
`
`US. Patent
`
`Jun. 4, 2002
`
`Sheet 10 of 15
`
`US 6,401,138 B1
`
`
`
`
`
`
`
`QSEEEE2:34893:25-998-6“.3.8
`
`£333
`
`an:Egm£85
`
`$3355.15;6231?
`
`E0633.6.Emso:2.a Bomacmfilam
` OEufiEmmoEoycoéofioomiaa
`
`
`
`
`Eo‘mEwan“;
`
`E20Emaom
`
`CEofluuo
`
`Ego3
`
`“omacgmEa3m
`
`0.32%.”
`
`03%.:
`
`2323%2x
`
`38953Q2a:3as
`
`0_.o_.._
`
`011
`
`011
`
`
`
`
`
`
`
`
`
`US. Patent
`
`5
`
`US 6,401,138 B1
`
`
`
`2253%P832?23mEaton.253=m533:3.”35>
`
`
`4,932553N.HCE“0.2%.?
`
`
`
`
`M3%816%32:?m:28t;.25:
`
`H
`
`:6:
`
`.H02%
`
`
`012
`
`
`
`02238021.83.83332
`
`$.302%E23ml?3%
`
`012
`
`
`
`US. Patent
`
`US 6,401,138 B1
`
`m.955an:B99:;M.can029..
`
`.82.25“.—mH09652
`
`
`
`H
`
`Nfio:
`
`
`
`253%wemfimfl22me£3th
`
`.25322830238at»)m93.35234N,HCeaseOasis;m303°3%“nogoEmmlaa
`m>u5um
`
`
`
`
`
`usual?o_on_l_on_._._o._on_5:333
`
`013
`
`013
`
`
`
`CMU
`
`US 6,401,138 B1
`
`eT
`on,55:2can3WQ3.26:Ia1333?:norare}IE3.m:za_oo9£38:33325a.828E338a3%
`
`
`Gunficmtaofimmm,|lv3:2.3:958
`
`
`
`
`
`
`
`
`0Eofi2:2:50“a.83on:08.o.._E96of€02
`oflozotscguJhH3823m52:
`n.
`
`
`
`
`
`
`
`mC3265Came:03:0:
`
`fHME26._.232.55n8mafia;m959%
`sH33.:E96:32...
`
`3:96BRaga=oS...
`
`«:25toESQ«we
`
`osmzvou233baa:3E96x3
`
`
`
`
`923:2
`
`103:85:832=8
`
`mo
`
`
`
`omega:$535..#8;
`
`E.o:
`
`014
`
`014
`
`
`
`
`US. Patent
`
`1B8
`
`
`
`oucguJon.023:6;van—lam4.5.5.”.
`
`
`
`
`
`£333
`
`.mEm:3%mu3%u>oEom
` 2%32%m2%230.8.eomaBen22:o:t4.,03,296th
`
`
`38__oB.._
`
`ArumagoEeman:E?»mo3%930m%£53..gohe...
`5.53H33%.93:E9529:o:=A01
`
`
`
`003840.”.0538?qu
`
`
`
`HzEase—:330.8
`
`
`
`E?»32%
`
`
`
`83%63%32%En:$89...m“"025E353305523
`BanammEJ32%oeoinmfifioc
`
`1,HM,325magmas05£23boEoE
`
`
`
`
`
`
`E.9...
`
`015
`
`u>oEo§maul.9%03%?
`
`
`
`.8so:3%.8965225E::5:323852::533$82;
`
`
` do52..
`
`015
`
`
`
`
`
`US. Patent
`
`Jun.4,2002
`
`Shcctls ofls
`
`US 6,401,138 B1
`
`m_.o_.._
`
`
`IE§§§§EII.§
`El
`
`‘.‘.~.|...-\§-H-:~~l
`izaaazom‘g‘
`I‘ll.25a:saw3“‘\“
` xucg‘‘‘l‘“fig.‘£05.58555“
`
`“in.
`
`
`Emu;rm:hmjmm
`.:m:>mm¢u
`
`mxmomeaz
`
`mmmomo
`
`“
`
`016
`
`016
`
`
`
`US 6,401,138 B1
`
`1
`INTERFACE FOR PA'I‘IENT CONTEXT
`SHARING AND APPLICATION SWITCHING
`
`FIELD OF THE INVENTION
`
`invention relates to improvements in the
`The present
`usability of medical information systems, and in particular
`to a facility that supports users switching among different
`application programs such that these applications retain the
`same patient context.
`BACKGROUND
`
`Computer programs have been developed to support
`many different aspects of the healthcare delivery system
`(e.g., clinical
`information systems, patient monitoring
`systems, decision support systems, hospital administration
`systems). The resulting medical
`information system is a
`diverse array of relatively independent programs: programs
`developed at different times, programs developed to address
`different problems, programs developed by or for people
`with different areas of expertise. In evaluating any particular
`patient situation, a user of such a composite medical infor-
`mation system may need to review data about a single
`patient using more than one program.
`Although programmers have developed mechanisms for
`sending data from one program to another, for coordination
`of the displays in separate windoWS of one program, for
`event-driven message passing between programs, and other
`such techniques, the usability of composite medical infor-
`mation systems continues to suffer from the separatcness of
`the programs that make up such systems. Because of the
`independent nature of such programs, one program does not
`have the benefit of the context of another of the programs.
`For example, a clinician must go through similar (seemingly
`redu ndant) introductory steps (such as to identify and locate
`a particular patient ’5 record) with each program.
`SUMMARY OF THE INVEN'I'ION
`
`invention, a patient context
`According to the present
`interface (PCI) provides services to a plurality of programs
`within a composite medical information system. The PCI
`provides these services by means of an application program-
`ming interface (API).
`These services include the following: registering applica-
`tion programs using the PC! (and permitting applications to
`team about other applications that have registered to use the
`PCI); registering application programs for particular events,
`such as a change in an item of stored patient context
`information, (and sending notifications to such applications
`when an update to such stored itern occurs); storing patient
`context
`information received from application programs
`(and providing this stored information to other applications
`upon request). These services permit an application to send
`various types of events to all other programs that have
`registered for that
`type of event. Further,
`these services
`permit one application to send a focus change event to a
`specified second application and permit the second applica-
`tion to read patient context information so that the second
`application display’s data coordinated with the first appli-
`cation (for example, the second application can automati-
`cally retrieve data for the same patient whose data is being
`displayed by the first application).
`With the PCI, each of a plurality of applications can be
`written to work with a single, common interface and yet
`share patient context with a plurality of other applications.
`In addition, using the PCI, an application can identifyr (on
`a real-time basis) other medical applications. can present to
`
`it]
`
`15
`
`so
`
`35
`
`40
`
`45
`
`50
`
`55
`
`60
`
`65
`
`017
`
`2
`a user of the system a list of such applications from which
`the user can select an application, and can cause the user
`interface focus to switch to that selected application.
`Thus,
`the PCI permits medical applications to share
`patient context information, such as patient identifications
`(e.g., the clinician is now looking at data for the patient with
`medical record number X), time periods (e.g., the clinician
`is now looking at last week‘s data), body system (e.g., the
`clinician is now looking at data relating to the functioning of
`the patient’s neural system), disease (e.g., the clinician is
`now looking at data indicative of the progress of a particular
`one of the patient's physiological disorders), department
`(e.g., the clinician is now looking at data from the cardiology
`department).
`
`BRIEF DESCRIPTION OF THE DRAWING
`
`The invention is pointed out with particularity in the
`appended claims. The above and other advantages of the
`invention may be better understood by referring to the
`following detailed description in conjunction with the
`drawing, in which:
`FIG.
`1
`illustrates some internal aspects of a patient
`context interface (PCI) according to the present invention
`and how the PCI interacts with application programs;
`FIG. 2 illustrates symbols used in the class diagrams of
`FIGS. 3—7;
`FIG. 3 illustrates relationships among the major classes of
`objects in an illustrative implementation of the PCI;
`FIG. 4 illustrates the PCI_PCIC object class,
`particular, class methods and members;
`FIG. 5 illustrates the PCI_ApplicationC object class, in
`particular, class methods and members;
`FIG. 6 illustrates the PCI_DataC object class,
`particular, class methods and members;
`FIG. 7 illustrates the PCI_EventC and PCl_EventUserC
`object classes, in particular, class methods and members;
`FIGS. 8—14 are event diagrams that show the interaction
`between objects in the illustrative PCI.
`FIG. 15 is a screen display illustrating a "switch-to"
`menu.
`
`in
`
`in
`
`DE’I'AILED DESCRIPTION OF AN
`ILLUSTRATIVE EMBODIMENT
`
`An illustrative embodiment of the invention is described
`below by (1) describing a design for a application program-
`ming interface (API) for a patient context interface (PCI),
`(2) describing an implementation of the services to support
`that API, and (3) describing how applications are built to
`take advantage of the PC]. Use of the PCI by an application
`program is illustrated by discussion of the CareVue clinical
`information system from Hewlett-Packard Company. Other
`healthcare information applications such as patient sched-
`uling systems and medical data archive systems are also
`good candidates for using the PCI.
`1 The PCI AP]
`Application programs (often simply “applications“) inter-
`act with the PCI through an application programming inter-
`face (APl)—in particular, the applications make calls to a set
`of functions that invoke computer program code in the PCI’s
`dynamic link library (DLL). The PC] API
`includes the
`following function calls (described in greater detail below):
`PCI __RegisterApplication( name)
`PCI_RegisterData(data)
`PCI_RegisterEvent(event. clientDatap, notifyCallhack)
`
`017
`
`
`
`US 6,401,138 B1
`
`3
`PC]_RegisterEventW(event, window, uMessage)
`PC]_Store(data)
`PC]_Notify(event, hndl)
`PC]_RetrieveAppls(namev, hndlv, count)
`l’Cl_.Retricve(data)
`Ll PC]-RegisterApplication( )
`function registers an
`'l‘he l’CI _RegisterApplication( )
`application with the PC]. This function must be called prior
`to an application calling any other PC] function. The name
`argument should be unique across all applications using the
`PC]. Another application may retrieve this name via the
`PC]_RetrieveAppls( ) function, and display the name to
`users (for example, to permit users to select an application
`to which they want to switch).
`Function Declaration
`
`PCI_Return'I‘ype PCI_RegisterApplieation( char
`‘name );
`Parameters
`char ‘name
`Required parameter to identify the application to the PCI.
`Maximum application name length is PCI_
`APPLNAMEMAX characters, including the NULL termi~
`nator,
`Return Value
`If the function succeeds.
`SUCCESS.
`If
`the name is NULL,
`INVALIDARGS.
`If the application is already registered with the PC], the
`return value is PC] DUPLICATEAPP
`If more than the maximum number of applications are
`registered with the PC],
`the return value is PCI_
`MAMtEACHED.
`
`the return value is PCI_
`
`the return values is PCI_
`
`1.2 PCI_RegisterData{ )
`The PC] _RegisterData( ) function registers a data type
`with the PC] so an application may store and retrieve that
`type of data in the future. This function must be called prior
`to calling PCI___Store( ) or PCl__Retrieve( ).
`Function Declaration
`
`PCI_ReturnType PCI_RegisterData( PCI_Data data );
`Parameters
`PCI_ Data data
`A struct (C language data structure) containing:
`l’Cl Data'l'ype datald;
`PCI_Any datap;
`PCI_DataSz 32;
`The dataId value must be unique across all applications
`using the PC], and identical in those applications wishing to
`share the data value. The datap value is a pointer to a buffer
`containing the initial value of the data type. Note it
`is
`permissible for this value to be NULL initially. The sz value
`identifies the size of the data being registered.
`Return Value
`If the function succeeds,
`SUCCESS.
`If the data argument is invalid, the return value is PCI_
`INVAUDARGS.
`If the application is not registered with the PCI, the return
`value is PCI_NO'I'REGISTERED.
`If more than the maximum number of data types are
`registered with the PCI,
`the return value is PCI.
`MAXREACHED.
`1.3 PCI__ RegisterEvenl( ) and PCI_ RegisterEventW( )
`The PCI_RegisterEvent{ } and PC]_RegisterEventW( )
`functions register an-event type with the PC] so an appli-
`cation may notify the PC] of that type of event andlor be
`
`the return value is PCI_
`
`4
`notified by the PC] when another application notilies the PCI
`that such an event has occurred. Prior to calling PCI_
`Notify( ), one of these two functions must he called by each
`application wishing to use the event type. When an event
`occurs, applications registered using PCl—RegisterEvent( )
`function are notified by a callback mechanism, and appli-
`cations registered using this PC] __RegisterEventW( ) func-
`tion are notified by a Microsoft Windows message (in
`particular,
`the message specified in this function call
`is
`posted to the message queue for the particular window
`specified in this function call). The PCI_RegisterEventW( )
`function is used by 16-bit applications; 32-bit applications
`may use either of the two even registration functions.
`Although the PC] Notify( )
`function initiates certain
`events, there are events that are initiated by the PCI itself.
`For example, the updating of a data value is an event. Any
`application registered for a type of data may also register for
`the corresponding data change event, so that the application
`will be notified by the PC] when that data item is updated.
`There are other events initiated by the PC]: registration of an
`event or data is itself an event; registration of an application
`is an event; and occurrence of any event is an event. While
`some of these events are primarily of use for debugging, any
`application may register to receive these events, in the same
`way that applications register to receive events initiated by
`PC1_Notify( ).
`A focus change event is another prc-delined event type;
`however, these events are not initiated by the PC] itself. A
`focus change event is used to permit application switching,
`as described below in section 3.3 “Use of the PC] API”.
`Function Declaration
`
`l’Cl Event
`(
`PCI ._Return‘I‘ype PCI_ RegisterEvcnt
`event, PCI_Any clientDatap, PCI_]nterfaceCB noti-
`fyCallhack );
`PCI_ReturnTypc PCI_RegisterEventW ( PCI_Evcnt
`event, PC] HWND window, PCI_ UMsg uMessage };
`Parameters
`PCI_Event event
`A struct containing:
`PC I _EventType event]d;
`PCI_DataType optDatald;
`The event]d value must be unique across all applications
`using the PC], and identical in those applications wishing to
`share the event. The optDataId maybe used to link an event
`identified by event]d to a type of data, such as the following
`example: a particular eventII) could indicate that there has
`been a change in one of several possible data items; the
`optDataId parameter would indicate which of the data items
`had been changed.
`PCI_Any clientDatap
`Application specific data to be passed to the callback
`function when the event occurs. Because the data is passed
`by pointer, the address must be valid for as long as the event
`is to occur.
`PCI_[nterfaceC'B notifyCallback
`A function to be called by the PC] when the event occurs.
`The callback function must be of the fomi:
`
`foo( PCI_Evertt event]d, PCI_Any *clientDatap)
`where the value ofeventlD has already been registered with
`the PC] by this application, and PCI_.Any *clientDatap is
`application specific data provided by the application as
`described above. This callback function must be N’l‘ thread
`safe because it is being called in a separate NT thread when
`the event occurs.
`PCI_HWND window
`A Microsoft Windows handle for the window that is to
`receive the message when the event occurs.
`
`it]
`
`15
`
`so
`
`35
`
`40
`
`45
`
`50
`
`55
`
`60
`
`65
`
`018
`
`018
`
`
`
`5
`
`US 6,401,138 B1
`
`the return value is PCl
`
`is invalid,
`
`the return value is
`
`PCI_UMsg uMessage
`A valid Microsoft Windows message {preferably in the
`WM_USER range) to be posted to the above identified
`window when the event occurs.
`Return Value
`If the function succeeds,
`SUCCESS.
`If the event argument
`PCI_[NVALIDARGS.
`Ifthe application is not registered with the PCI, the return
`value is PCI_NOTREGISTERED.
`types are
`If more than the maximum number of event
`registered with the PCI,
`the return value is PCI_
`MAXREACHED.
`1.4 PCI_Store( )
`The PC]_ Store( ) function allows applications to store
`data in the l’CI by copying the data from an application’s
`buiIer. The PCI does not itself interpret the content of the
`data; it is the applications sharing the data that give particu-
`lar meaning to the data. Any applications registered for a
`particular type of data may update the value of that data; it
`is the responsibility of each such application to assure that
`the same datald and 52 are used.
`the
`Because the data is not
`interpreted by the PCI,
`applications that store audior retrieve a particular data type
`must store and retrieve that data in a common format (unless
`the format is self-identifying, permitting each application to
`identify the format of stored data, so that the application can
`convert
`the data if necessary). For example, applications
`sharing text should store the text in the PCI using a character
`set that can be interpreted by all of those applications.
`Ideally, applications using the PC! should update the
`patient context
`information whenever
`the information
`changes, such as when a user scelets a new patient; however,
`this may not always occur (e.g., due to a design limitation or
`error in the application).
`Function Declaration
`
`PC[_ReturnType PCI_Store{ PC[_I)ata data );
`Parameters
`PCI_Data data
`A struct containing:
`PCI_DataType dataId;
`PCI_Any datap;
`l’CI DataSz s2;
`The rlataId value must be unique across all applications
`using the PCI, and identical in those applications wishing to
`share the data value. The datap value is a pointer to a bu fier
`containing the value to be stored. It is not permissible for this
`value to be NULL for a data store operation. The sz value
`identifies the size of the data to be retrieved.
`Return Value
`If the function succeeds,
`SUCCESS.
`If datadatap is NULL or data.sz is greater than the
`registered size, the return value is PCI_INVALIDDA1‘A.
`If the application or the dataId is not registered with the
`PCI, the return value is PCI_NOTREGISTERED.
`1.5 PCI_Notify( )
`The PCI_Notify( ) function is used to notify the PCI that
`an event has occurred. Upon such notification,
`the PCI
`notifies either all or a selected one of those applications that
`have registered the corresponding event type (except that the
`application calling this function is not notified about
`the
`event). Applications that have registered by using I’Cl
`RegisterEvent{ ) are notified by executing their callback
`functions; applications that have registered by using PCI_
`RegisterEventW{ ) are notified by sending a Microsoft
`
`the return value is PCI_
`
`6
`Windows message. This function returns when all interested
`applications have been notified, but does not wait for those
`applications to process the event.
`Function Declaration
`
`PCI_ReturnType PCl_Notify( PCL Event event, PCI_
`Apleandle hndl );
`Parameters
`l’Cl_Evcnt event
`struct containing:
`PCI_EventType eventld;
`PCI_DataType optDataId;
`The eventld value must be unique across all applications
`using the PCI, and identical in those applications wishing to
`share the event. The optDataId maybe used to link the event
`to a data 11), as described above in connection with the
`l’CI_RegisterEvent( ) function.
`PCl__ApplIIandle hndl
`Identifies the application to be notified. All applications
`registering this event may be notified by setting hndl
`to
`PCI_ALI..APPLICATIONS. Valid handles may be obtained
`from the PCI via the PCI_RetrieveAppls( } function. A
`target application will only be notified if it is both registered
`with the PCI and registered for this event.
`Return Value
`If the function succeeds,
`SUCCESS.
`
`the return values is l’Cl_
`
`is invalid,
`
`the return value is
`
`if the event argument
`PC1_INVAI..IDAR GS.
`if the hndl argument is invalid, the return value is PCI_
`INVAI..IDHNDI..
`If the application or the event is not registered with the
`PCI, the return value is PCI _NOTREGISTERED.
`1.6 PCI RetrieveAppls{ }
`The PCI__RetrieveAppis{ ) function is retrieves a list of
`names and PC[ application handles for all applications
`registered with the PC]. The names returned are the names
`each application registered with the PCI (using PCl__
`RegisterApplication{ ] ). PCI_ Apleandles are guaranteed
`to be valid for as long as the application described by the
`handle is registered with the PC]. The PCI_ApplI-landles
`returned may be used with the PCl_Notify( ) function to
`notify a particular application about an event.
`Function Declaration
`
`PCl Return'l‘ype l’CI RetrieveAppls( char "nan-rev,
`PCI
`.Apleandle Mhndlv, PCI. .Appllndex *eount );
`Parameters
`char "narnev
`An array ofpointers to buffers in which application names
`are to be stored. The size of the array should be ‘count long;
`the maximum size of each bulfer should be PCI_
`APPLNAMEMAX long, including the NULL character.
`PCI_Apleandle **hndlv
`An array of pointers to bufi'ers in which the PC] applica-
`tion handles are to be stored. The size of the array should be
`‘count long.
`l’CI_Appllndex ‘count
`A pointer to number of elements in the above arrays. On
`return this value will be changed to number of elements
`actually returned by the PCI. The maximum count allowed
`is PCLAPPLMAX.
`Return Value
`If the function succeeds,
`SUCCESS.
`If any argument is NULL or ‘count is 0, the return value
`is PCI_INVA[,IDARGS.
`11‘ the application is not registered with the PCI, the return
`value is PCI_NOTREGISTERED.
`
`the return values is PCI,
`
`In
`
`15
`
`an
`
`35
`
`40
`
`45
`
`50
`
`55
`
`60
`
`65
`
`019
`
`019
`
`
`
`US 6,401,138 B1
`
`7
`If *count is less than the actual number of applications
`registered with the PCI, as many as possible are filled in to
`the above arrays and the return value is PCI_
`BUFFERZSMAIJ...
`1.7 PCI_Retrieve( )
`The PCI __Retrieve( } function retrieves data from the PCI
`by copying the data to an application’s butter. The same data
`may be retrieved by any number of the applications that have
`registered for that particular type of data. The PC I does not
`itself interpret the content of the data; it is the applications
`sharing the data that give particular meaning to the data. It
`is the responsibility of the applications sharing data through
`the PCI to be sure to use the same datald and sz for each type
`of data being shared.
`Function Declaration
`
`It]
`
`15
`
`the return values is PCI
`
`8
`above. These functions invoke code in one or both of two
`NT dynamic link libraries (DLLs). 11' the application is a
`32-bit native NT application, it uses the NT native PCIDIJ.
`70, which is a 32—bit dynamic link library; if the application
`is 16-bit application (i.e., Microsoft Windows 3.1
`applications) it uses the PCI 16.DLL 62, which acts as an
`interface to the 32—bit PCIDLL. as is illustrated in FIG. 1.
`The PCI 16.DLL converts all application data passed to the
`PCI from 16-bit to 32-bit values, as well as from the 16-bit
`segmented memory model to the 32-bit llat memory model.
`Under NT this conversion is known as thunking, and the
`PCIlfiDIl. interface is known as a lhunking layer.
`The PCI’s data sharing mechanism is implemented as
`shared memory 64. Each application registering with the
`PCI gains access to the shared memory 64 through the PCI
`functions PCI_Retrieve( ) and PCI__Store( }.
`Event notification is implemented as a separate event
`queue (such as the event queue 56 for application A and
`event queue 55 for application B) and a separate NT thread
`(such as the event thread 58 for application A and event
`thread 5‘7 for application B) for each application registered
`with the PCI to receive one or more types of events. When
`an application calls PCI Notify( }, new events are placed on
`the event queues for each application to be notified. Each
`thread corresponding an application to be notified is signaled
`to read the event otI its queue and notify its corresponding
`application. The notification occurs in one of two ways
`depending upon whether
`the application to be notified
`registered using PCI_RegislerEvent(
`) or PCI_
`RegisterEventW{ ): in the first case (32-bit applications), the
`application is notified calling the callback function provided
`by the application; in the second case (16-bit applications;
`and, 32~bit applications that chose, by using I’CI_
`RegisterEventW( ) function, to be notified by a Microsoft
`Windows message), the thread posts a Microsoft Windows
`message to the applications message queue.
`2.2 Classes
`The illustrative embodiment of the PCI is built using C++
`objects that mode] difl'erent entities, such as applications,
`events, and data. The major object classes are as follows:
`PCI_PCIC 138. PCI_ApplicationC 140, PCI_EventC 136,
`PCI _EventUserC 132, PCI DataC 134, PCI_ QueueC,
`PCLAllocatorC. FIG. 3 shows how these clasas are related
`to each other. {Note that two of the “has-a" relationships
`illustrated in FIG. 3, I42 and 144, are intended primarily for
`debugging.)
`2.2.1 I’CI_PCIC
`The PC'I_PCIC class 138 is illustrated in FIG. 4. Asingle
`object of class PCI_I’CIC represents the overall PCI. The
`function calls that applications make to the PCI are directed
`to this single l’Cl__l’ClC object. To handle these function
`calls, the PCI_PCIC class has a method corresponding to
`each such finction call (the name of each method is similar
`to the name of the corresponding function call):
`registerAppl( )220, unregisterAppl( ) 222 (in the illustrative
`implementation this method is used internally by the PC],
`but
`is not directly available in the API; a
`function call
`corresponding to this method could be added to the API),
`registerData{ ) 214, registerEvent{ ) 210 (including versions
`for each of the two event registration function calls), storct )
`218, notify( ) 212, retrieveAppls( ) 224, and retrieve( ) 216.
`This PCI
`l’CIC object includes an array of application
`objects 230, an array of data objects 234, and an array of
`event objects 232. When an application registers with the
`PCI, a PCI_ApplicationC object is created and a reference
`to it
`is added to an array of such references 230 in the
`PCLPCIC object 138. Likewise, when data and events are
`
`l’CI Retum'l‘ype PCI Retrieve( PCI Data data );
`Parameters
`PCI Data data
`A struct containing:
`PCI_DataType datald;
`PC[_Any datap;
`I’CI_DataSz s2;
`The datald value must be unique across all applications
`using the PCI, and identical in those applications wishing to
`share the data value. The datap value is a pointer to a _
`destination buller to which the data is to be copied. It is not
`permissible for this value to be NULL for a retrieve. The 57.
`value identifies the size of the data to be retrieved.
`Return Value
`If the function succeeds.
`SUCCESS.
`If data.datap is NULL, the return value is PCI _ ERROR.
`If the application or the dataid is not registered with the
`PCI, the return value is PCI__NOTRI:'.GISTERED.
`Ifdatasz is less than the sire of the data stored in the PCI,
`the value is not retrieved and the return value is PCI .
`BUFFERZSMALI..
`2 PCI Internals
`The illustrative PCI is implemented in the C++ program-
`ming language and runs under Microsoft Windows NT (a
`product of Microsoft Corporation}. Because the design was
`developed using object oriented methodologies, the follow-
`ing description uses class hierarchy and object event dia-
`grams. The executable program code implementing the PCI
`is stored on magnetic disk and loaded into RAM for execu~
`tion. Alternatively,
`it could be stored in other types of
`computer-readable media.
`The object oriented class diagrams shown in the figures
`are based on the Rumbaugh object oriented design diagram-
`rning technique. These diagrams use the following conven-
`tions. The large rectangles (such as 110, in FIG. 2) represent
`classes or types. Connections between these boxes such as
`112 represent "has a” relationships. Connections with an
`U—shaped symbol (such as 114) represent one—to—many "has
`a” relationships. Small rectangles (such as 116} represent
`class member variables. Small 5-sided boxes (such as 118)
`represent class methods (i.e., functions).
`2.] Architecture
`FIG. 1 shows two applications (illustrative application A
`501's a 32—bit application, and one illustrative app