METHOD AND SYSTEM FOR DISTRIBUTING HEALTH INFORMATION

Abstract: A method of and system for distributing medical information for an individual over a communications network is disclosed. The method includes the steps of generating a plurality of security access codes (202), generating a plurality of hierarchical categories ranging from a low security category to a high security category (204), categorizing the individual's medical information into privacy levels ranging from a least private level to a most private level (206), inputting the individual's categorized medical information into the plurality of hierarchical categories (208), the least private level being input into the low security category and the most private level being input into the high security category and assigning, to each of the categories, one or more of the access security codes, such that the medical information in each category will be released only if the assigned access security codes are received (214).

Description: APPLICATION FOR UNITED STATES LETTERS PATENT TO ALL WHOM IT MAY CONCERN: Be it known that Roy Schoenberg has invented METHOD AND SYSTEM FOR DISTRIBUTING HEALTH INFORMATION of which the following description in connection with the accompanying drawings is a specification. RELATED APPLICATIONS This application claims the benefit of United States Provisional Patent Application No. 60/183,857, filed February 22, 2000. FIELD OF THE INVENTION This invention generally relates to a method of and system for distributing medical information over a communications network, and more specifically to a method of and system for assigning increasing levels of security to portions of an individual's medical records and linking each of the security levels to access security codes that must be supplied by the requestor of the medical information in order to access the medical records. BACKGROUND OF THE INVENTION When a patient is brought into a hospital for emergency care, it is very unlikely that the patient's medical record will be present in the hospital. A patient's medical record is very important, particularly in an emergency situation, as it typically contains information regarding the patient's blood type, allergies, medical history, etc. Typically, such records are at the location where the patient receives the majority of his or her medical care. In most cases, this is the location of the patient's primary care physician, thus making quick access to the record by the emergency care provider virtually impossible. Furthermore, even if the patient's medical record is accessible, it is likely that much of the information in the record is scattered between several archives in various locations-; is obsolete, redundant or indecipherable to the extent that it does not benefit the patient at the point of care. Presently, the transfer of patients' medical records between care providers is done in a number of different ways. Records can be transferred by phone, facsimile and overnight mail, however, these options are relatively slow, expensive and can be unreliable. The use of email for transferring medical records can be relatively simple and quick. However, email is typically too insecure for transferring the sensitive information contained in a patient's medical record, and information can only be exchanged between parties that are aware of each other's email addresses. Smart cards, which contain memory devices in which a patient's medical data is stored, allow the patient to carry his or her medical records, thereby potentially enabling immediate access to the patient's record. However, the cards are easily lost or misplaced, thus endangering the securing of the record, and smart cards must be compatible with the smart card reader at a particular medical location, which may not always be the case. Furthermore, since the smart card must be physically present at the time the information is needed, remote consultation is impossible. For example, if an ambulance is bringing a patient to the hospital, the information contained in the smart card cannot be accessed by care providers at the hospital until the patient arrives. A further disadvantage of the above methods is that they generally do not permit only selective access to the patient's information, depending on the situation that has precipitated the need for the patient's medical data. For example, if the patient suffers a broken bone, while information regarding the patient's blood type and allergies might be necessary for the proper treatment of the injury, the patient's cardiological or serological data is not. None of the above methods can prevent unnecessary medical data from being divulged to the medical care provider, thus potentially risking the patient's privacy. While the internet could be used to distribute medical records, there is presently no online system that is capable of securely distributing only the information from a patient's medical record that is necessary for the situation that has required access to the record. Accordingly, it is an object of this invention to provide a method of and system for distributing medical information in which the medical care provider has quick access to a patient's medical record, but only to the information within the medical record that is necessary for the proper treatment of the patient at that time. SUMMARY OF THE INVENTION The present invention is directed to a method of and system for distributing medical information over a communications network. A patient's medical record is divided into a hierarchy of categories, each category having a level of privacy associated therewith which is greater than the previous level. The lowest level category could include information such as blood type and allergies, while a high- level category could include the patient's HIV status. The patient constructs a list of access codes, wherein, the higher the level of the category, the more access codes are required to gain access to the category of the medical record. This enables the patient to control how much access to his or her medical records a particular medical care provider has, by selecting the access codes that are provided to the care provider. According to the invention, a method for distributing health information includes the steps of generating health data representative of at least one set of health information for an individual, generating access priority data representative of an access priority associated with each of the at least one set of health information, the access priority being based on criteria for release authorization established by the individual, storing at a datastore the health data and associated access priority data and receiving from a requestor, by way of a communications network, a request for at least one of the sets of health information, the request including access data correlated to an access priority. The method further includes the steps of processing the access data to determine whether the access data corresponds to the access priority criteria for the requested health information. When the access data corresponds to the access criteria for the requested health information, the requested health information is transmitted to the requestor by way of the communications network, and, when the access data fails to correspond to the access criteria, access to the requestor to the health information is denied. The communications network may be the Internet and the transmitted health information may be encrypted. According to another embodiment of the invention, a method of distributing medical information for an individual over a communications network includes the steps of generating a plurality of security access codes, generating a plurality of hierarchical categories, ranging from a low security category to a high security category, categorizing the individual's medical information into privacy levels ranging from a least private level to a most private level, inputting the individual's categorized medical information into the plurality of hierarchical categories, the least private level being input into the low security category and the most private level being input into the high security category and assigning, to each of the categories, one or more of the access security codes, such that the medical information in each category will be released only if the assigned access security codes are received. The method further includes the steps of receiving, from a requestor, one or more of the access security codes over the communications network, determining whether the received access security codes match one or more of the assigned access security codes and transmitting, to the requestor over the communications network, the medical information in the categories in which the received security access codes match the assigned security access codes. A system for distributing medical information for an individual over a communications network according to the present invention includes a server system including a computer processor and associated memory, the server system having database of a plurality or hierarchical categories for the individual, the categories ranging from a low security category to a high security category, each of the categories having medical information of the information contained therein. The medical information ranges from least private information to most private information, the least private medical information being contained in the low security category and the most private medical information being contained in the high security category. Each of the categories have one or more security access codes assigned thereto. The system further includes a request system including a computer processor and associated memory, the requestor system inputting one or more of the secuiity access codes to the server system over the communications network and an access determining device for transmitting, to the requestor system, the medical information in each of the categories in which the input security access codes match the assigned security access codes. The system may further include a setup system, having a computer processor and associated memory, for inputting the medical information to the database. The security access codes may be defined by a user and assigned to the categories by the user through the setup system. More of the security access codes may be required to access the high security categories than the low security categories. The setup system and the requestor system may be the same system. The setup system may be coupleable to said network by a wired or a wireless connection, and may be a personal computer, an interactive television system, a personal digital assistant or a cellular telephone. BRIEF DESCRIPTION OF THE DRAWINGS The foregoing and other objects of this invention, the various features thereof, as well as the invention itself may be more fully understood from the following description when read together with the accompanying drawings in which: FIG. 1 is a diagrammatic view of a system for distributing medical information in accordance with the present invention; FIG. 2 is a flow diagram of a method of distributing medical information in accordance with the present invention; FIG. 3 is a schematic diagram of an example medical record in accordance with the system of FIG. 1; FIG. 4 is a diagrammatic view of another embodiment of the system of FIG. 1; and FIG. 5 is a diagrammatic view of yet another embodiment of the system of FIG. 1. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention enables a medical care provider to have remote access to a patient's medical record, while also enabling the patient to dictate exactly how much information the medical care provider can access. FIG. 1 shows a diagram of a system 100 for distributing medical information in accordance with a preferred embodiment of the present invention. The system 100 includes setup system 110, server system 120 and request system 130 all connected to a common communications network 160. Preferably, the setup system 110, server system 120 and request system 130 can each be a personal computer such as an IBM PC or IBM PC compatible system or an APPLE® MacINTOSH® system or a more advanced computer system such as an Alpha-based computer system available from Compaq Computer Corporation or SPARC® Station computer system available from SUN Microsystems Corporation, although a main frame computer system can also be used. Preferably, the communications channel 160 is a TCP/IP-based network such as the Internet or an intranet, although almost any well known LAN, WAN or VPN technology can be used. In one preferred embodiment of the invention, the setup system 110 and request system 130 are IBM PC compatible systems operating a Microsoft Windows® operating system and server system 120 is configured as a web server providing access to information such as web pages in HTML format via the HyperText Transport Protocol (http). The setup system 110 and request system 130 include software to allow viewing of web pages, commonly referred to as a web browser, thus being capable of accessing web pages located on server system 120. Furthermore, setup system 110, server system 120 and request system 130 include software for encrypting and decrypting data that is transmitted over the communications network 160. Alternatively, setup system 110 and request system 130 can be any wired or wireless device that can be connected to a communications network, such as an interactive television system, such as WEBTV, a personal digital assistant (PDA) or a cellular telephone. In this preferred embodiment, setup system 110 is located at the patient's primary care physician's office and request system 130 is located wherever access to a patient's medical record is required, such as in an emergency room, ambulance or another doctor's office. FIG. 2 shows a flow diagram of the method of distributing medical information according to the present invention. First, the user of the setup system 110, FIG. 1, who can be the patient or the patient's physician, generates security access codes, step 202, which will provide varying access to the patient's medical records. Such security access codes can include demographic data such as the patient's name, birth date, social security number, address and phone number; non- demographic data such as a passport number and the patient's native language; physical attributes such as eye and hair color and scars or other identifying marks; and user-definable fields such as passwords. The user then generates hierarchical categories into which the patient's medical information will be stored, step 204. These categories range from a low security category, for information that the patient is less concerned about becoming known by a third party, to a high security category, for information that the patient is more concerned about becoming known by a third party. The patient and/or the patient's physician then determine the level of privacy that is desired for each piece of medical information in the patient's medical record, step 206. The least private level could include information such as the patient's blood type and allergies. The most private level could include HIV data. Intermediate levels of privacy may include serology data, psychiatric data, cardiology data and genetic data. After the levels of privacy for each piece of the patient's medical information is determined, the information is transmitted from the setup system 110, FIG. 1, to the server system 120 over the communications network 160, and is stored in a database 122 of the server system 120, step 208. The patient then assigns one or more of the security access codes to each of the categories in the database 122, step 210. Preferably, security access codes that are easier to ascertain are assigned to low security categories, while security access codes that are more difficult to ascertain are assigned to high security categories. This allows the patient to more precisely control who has access to the categories, by enabling the patient to provide the security access codes for each of the categories only to medical personnel who have a "need-to-know" the particular information in each category. As a further security measure, the patient can define which of the security access codes are necessary to be input by the requestor to identify the requestor as being authorized to access the patient's medical record, step 212. The security access code that will identify an authorized requestor is preferably a code that will not be easily guessed by an unauthorized requestor. When a patient's medical record is needed, the requestor inputs to the server system 120, FIG. 1, through request system 130 and over network 160, any information that is known about the patient in order to identify the patient. While prior art systems require specific predetermined data to identify a patient, the present invention is capable of searching its database to identify the patient based on whatever information the requester can provide. Such information can include, but is not limited to, actual medical record numbers for a particular hospital, demographic data such as the patient's name, age and sex, information from a smart card that identifies the patient, retinal or iris scans and fingerprints. This flexible identification system enables the present invention to be used in conjunction with existing legacy systems. Since the database 122 may include medical records for a great number of patients, the server system 120 determines whether, based on the identification information input by the requestor, a unique patient match has been achieved, step 216. In this embodiment, the identification information input by the requestor could also be the security access codes set up by the patient. If the identification information input by the requestor does not define a unique patient in the database, the server system notifies the requestor that more identification information is needed to establish a unique patient match, step 218. If the identification information provided by the requestor provides a unique patient match, step 216, the server system prompts the requestor to enter security access codes for the patient. The server system then receives one or more of the security access codes input to the server system by the requestor, step 219. The server system 120 determines whether the received security access codes satisfy the requestor identification constraints, step 220. If they do not, the system notifies the requestor that the identification constraints have not been satisfied, step 222. If the identification constraints have been satisfied, the server system determines which of the assigned access codes match the received access codes input by the requestor, step 224, and transmits, to the request system 130 over the network 160, the information from the categories in which the received security access codes match the assigned security access codes, step 226. If more of the security access codes are received from the requestor, step 228, the system returns to step 224 to determine which of the assigned codes match the received codes. If no more codes are received in step 228, the process is terminated. An example of the above method will now be described with reference to FIG. 3, which is a schematic diagram of a patient's medical record in accordance to the present invention. Shown at 302 are the security access codes generated by the patient in step 202, FIG. 2. In this example, the security access codes are the patient's first and last name, zip code, eye color, street number, birth year and two passwords. Shown at 304 are the medical information categories generated by the patient in step 204. These categories include EKG data, allergies, blood type, serology, HIV and CD4. Shown at 306 are the security access codes that are assigned to the categories in step 210. As described above, security access codes that are easily ascertained are assigned to low security categories and security access codes that are more difficult to ascertain are assigned to high security categories. In this example, the patient's birth year is assigned to the blood type and allergies, while the patient-defined passwords are assigned to the HIV and CD4 categories. In step 212, the patient's first name and zip code, block 308, are chosen by the patient as the identification constraints that must be input by the requestor to establish that he or she is authorized to access the patient's record. The following table shows the response of the system of the present invention to various combinations of security access codes received from the requestor: If Requestor supplies this data System will respond with A. First Name "More than one patient found, No unique match" B. First Name, Birth Year, Key 1 "Unique Match, ID constraints not satisfied" C. First Name, Zip Code, Birth Year EKG data, Allergies, Blood Type D. First Name, Zip Code, Birth Year, Password 1 EKG data, Allergies, Blood Type, Serology, E. First Name, Zip Code, Birth Year, EKG data, Allergies, Blood Type, Password 1, Password 2 Serology, fflV F. First Name, Zip Code, Birth Year, EKG data, Allergies, Blood Type, Password 1, Password 2, Eye Color Serology, HIV, CD4 In case A, because only the first name of the patient has been received, the system determines that a unique patient match has not been found, step 216, and notifies the requestor that more identification information is needed, step 218. In case B, the first name, birth year and password 1 are received, step 214. Although these codes allow the system to identify the patient, step 216, the identification constraints (the first name and zip code) have not been satisfied, step 220. The system then notifies the requestor that more security access codes are needed to satisfy the identification constraints, step 222. In case C, the first name, zip code and birth year are received, step 214. A unique patient match is found, step 216 and the identification constraints are satisfied, step 220. The system then determines which of the assigned security access codes match the received security access codes, step 224, and transmits the information in the matched categories to the requestor over the communications network, step 226. In case C, because the zip code and birth year are received, referring to block 306, FIG. 3, the EKG data, allergy information and blood type are transmitted from the database to the requestor. In case D, in addition to the first name zip code and birth year, password 1 is received, step 228. Accordingly, in addition to the information transmitted in case C, the patient's serology information is transmitted to the requestor. In case E, with the receipt of password 2, the patient's HIV data is transmitted and, in case F, the receipt of password 2 and the patient's eye color prompts the transmission of the patient's CD4 data, in addition to all of the information transmitted in the previous cases. While the invention has been described as including one setup system that accesses the server system, a plurality of setup systems may be coupled to the server system in order to allow patients at different locations to access the server system. Such a configuration is illustrated in Fig. 4. In this system 300, in addition to the setup system 110, a second server system 140 is coupleable to the server system 120 over communications network 160 for the purpose distributing medical information in the manner described above. It will be understood that the server system can be accessed through any number of setup systems, and that any number of request systems may access the server system in the manner described above. In another embodiment, shown at 400 in FIG. 5, system 115 can be used both as the setup system, for setting up the patient's medical record on the database 122 of server system 120, as described above, and as the request system for inputting security access codes and receiving medical information from the database 122 of the server system 120, as described above. Accordingly, the present invention provides a method of and system for distributing medical information over a network in a granular manner, in which the patient determines the level of security associated with each category of his or her medical record. A requestor of the patient's medical information must input the proper security access codes to the system in order to obtain the information contained within the record. The system enables the patient to distribute the security access codes for the hierarchy of security categories to medical personnel on a "need-to-know" basis, thus reducing the risk that highly private medical hiformation be exposed to unauthorized personnel. Attached as Appendix A is the Javascript and VBscript code used to implement the present invention and a sample database on which the invention can be used. The invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are therefore to be considered in respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of the equivalency of the claims are therefore intended to be embraced therein. 01 <! — I include f ile=*"adovbs . inc" — > <% dim a() dim patient_id ******************************************************************************** **************** ' this sub loads the request data table with the entries in the form sub update_database_with_new_patient () dim time_stamp dim num_of_items dim counter time_stamp — cstr(now()) * time stamp counter » 0 length =• cin (Request.Form("count")) • number of fields to extract from request form ' create an entry in the patients table and get the new id set cnnl » server.CreateObject("adodb.connection") cnnl;Open "filedsn=cardionet.dsn" set rstl » server.CreateObject("adodb.recordset") rstl.ActiveConnection =* cnnl rstl.CursorType — adOpenKeyset rstl. ockType « * adLockOpt-ύnistic rstl.Source » "patients" rstl.open rstl.Addtfew rstl ("ref_data_l")=Request.Form("l") rstl ("ref_data_2")^Request.Form{"2") rstl ("ref_data_3")=Request.ServerVariables ("remote_addr") rstl.Update patient_id= rstl. ields("patient_id") rstl.Close set rstl = nothing • add the pid_data for the new patient to the pid_data table set rst2 = server.CreateObject("adodb.recordset") rst2.ActiveConnection = cnnl rst2.CursorType = adOpenKeyset rst2.LockType = adI»ockOpt?iιoistic rst2.Source = "pid_data" rst2.ppen for x *» 1 to length * loop through items if len(cstr(Request.Form(cstr(x))))>0 then * append only items that have a value enetered counter =» counter + 1 redi preserve a(3,counter) ' redim works only on last dimension, note it is turned around 2,30 a(0,counter) = cstr(x) • item id a (1, counter) = lcase(trim(Request.Form(cstr(x)))) * item value a(2, counter) = » (Request.For ("c" & cstr(x))-"on") ' item iβ a required for identification rst2.AddNew ' add a record for each entered item rst2("patient_id") =» cint(patientJLd) rst2("item_id") =• cint (a (0,counter}) rst2("value") =• cstr(a(1,counter) ) rst2.update if a(2,counter) then 'add a record in id j pass id this is a required item for identification set rst3 *• server.CreateObject("adodb.recordset") rst3.ActiveConnection » cnnl rst3.CursorType - adOpenKeyset rst3. ockType - adLockOptimistic •rst3.Source - "id_pass" rst3.0pen rst3.AddNew rst3("patient_id")-cint(patientJLd) rst3("item_id")=cint(a (0,counter) ) rst3.Update rst3.Close end if end if next rst2.Close cnnl.Close set rst2=nothing set cnnl=nothing a (0,0) — cstr(counter) end sub %> <HT L> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <T1T EX/TITLE> </HEAD> <body background=backgrnd.gif> <% call update_database_with_new_patient Response.Write ("Patient dded to Database") %> <P>Snbsp;</P> </BODY> </HTM > <!—#include file="adovbs.inc" --> <* dim a() dim patient_id **************** ' this sub loads the requestjdata table with the entries in the form sub uρdate_database_with_new_patient() dim time__stamp diiα nura of_items dim counter time_stamp — cstr(now()) • time stamp counter - 0 length » cint (Request. orm("count")) ' number of fields to extract from request form ' create an entry in the patients table and get the new id set cnnl — server.CreateObject("adodb.connection") cnnl.Open "filedsn-cardionet.dsn" set rstl — server.CreateObject("adodb.recordset") rstl.ActiveConnection » cnnl rstl.CursorType — adOpenKeyset rstl.LockType — adLockOptimistic rstl.Source — "patients" rstl.open rstl.AddNew rstl ("ref_data_l")=Reques .Form("1") rstl("ref_data_2")=Request.Form("2") rstl ("ref_data_3")=Request.ServerVariables("remote_addr") rstl.Update patient_id= rstl.Fields ("patient_id") rstl.Close set rstl = nothing * add the pid_data for the new patient to the pid_data table set rst2 = server.CreateObject ("adodb.recordset") rst2.ActiveConnection = cnnl rst2.CursorType — adOpenKeyset rst2.I»ockType = adLockOptimistic rst2.Source = "pid j data" rst2.Cpen for x = 1 to length * loop through items if len(cstr(Request.Form(cstr{x))))>0 then * append only items that have a value enetered counter «• counter + 1 redim preserve a (3,counter) ' redim works only on last dimension, note it is turned around 2,30 a(0, counter) — cstr(x) * item id a(1,counter) — lease(trim(Request.Form(cstr(x)))) * item value a(2,counter) - (Request.For ("c" fi cstr(x))-"on") * item is a required for identification rst2.AddNew * add a record for each entered item rst2("patient_id") - cint (patient_id) rst2("itea_id") - cint(a(0,counter)) rst2("value") — cstr(a(1,counter)) rst2.update if a (2,counter) then 'add a record in id_pass id this is a required item for identification set rst3 - server.CreateObject("adodb.recordset") rst3.ActiveConnection — cnnl rst3.CursorType — adOpenKeyset rst3.LockType — adLockOptimistic rst3.Source — "id_pass" rst3.Open rst3.AddNew rst3("patient_id")«cint(patient_id) rst3j"item_idF)-cint(a(0,counter) ) rst3.Update rst3.Close end if end if next rs 2.Close cnnl.Close set rst2-nothing set cnnl=nothing a(0,0) — cstr (counter) end sub %> <HTML> <HEAD> <META NAME=>"GENERATOR" Content-"Microsoft Visual Studio 6.0"> <TITLEX/TITLE> </HEAD> <body background=backgrnd.gif> <% call update_database_with_new_patient Response. rite("Patient * dded to Database") %> <P>6ribsp;</P> </B0DY> </HTML> " <! — tinclude file— "adovbs.inc" — > <% function item_locked(fld_name,fld_ alue,pid) set rst_chk=server.CreateObject ("adodb.recordset") rst_chk.ActiveConnection — cnnl rst_chk.CursorType — adOpenKeyset rst_chk.LockType — adLockOptimistic sql="select distinct item Ld from locks where (patient_id»" S cint(pid) C " and " & fld αame S "-" fi cint(fld_value) sql- sql β ") and item_id not in ( select distinct item_id from request_data where user^p-"* * user_ip β "*)" ~ ret_chk.Source - sql rst_chk.Open . if rst_chk.EOF then item Locked — false else item_locked — true end if 'while not (rst chk.EOF) • Response7write("<br>" & rst_chk. ields ("itera_id") & "<br>") * rst_chk.MoveNext •wend rst_chk.Close set rst_chk=nothing end function %> <htmlXheadx/headxbody background=backgrnd . gif > <strong> Observations s </strong> <hr> <table align=center border-3 bordercolor=#0000cd cellpadding=3 width=100%> <tr><th>Category</thxth>Parameter</th><thX)bservation</thx/tr> <% user_ip=Request.ServerVariables ("remote addr") ' open the database connection set cnnl =* server.CreateObject("adodb.connection") cnnl.Open" "filedsn=cardionet.dsn" ' extract the patient on which this ip is allowed to work on, from the online table set rst_jpid=server.CreateObject("adodb.recordset") rst_pid.ActiveConnection — cnnl rst pid.CursorType — adOpenKeyset rst_pid.LockType — adLockOptimistic rst_pid.Source — "select patient_id from online where user^p-'" fc user_ip fi "•' rstjpid.Open — if not rst_pid.EOF then pid=cint (rst_pid.Fields("patient_id") ) end if * loop through the categories set rst_cat » server.CreateObject("adodb.recordset") rst_cat.ActiveConnection - cnnl rst cat.CursorType - adOpenKeyset rst_cat.LockType — adLockOptimistic rst_cat.Source — "categories" rst_cat.Qpen while not rst_cat.EOF cat_id — cint(rst_cat.Fields("category_id")) cat_name— rst cat.Fields{"categoryjαame") •Response. rite(cat_id & "-") •Response.Write(cat~name ' " : ") if iten_locked("category_id",cat_id,pid) then * IF CATEGORY IS LOCKED Response.Write("<trxtd colspan-3 align-left>Category " fi cat_name * " is Locked</tdX/tr>") else * loop through the parameters set rstjpar — server.CreateObject("adodb.recordset") rst par.ActiveConnection - cnnl rst_par.CursorType - adOpenKeyset rstjpar.LockType = adLockOptimistic - rstjpar.Source — "select * from [parameters] where category_id=" & cat_id rstjpar.Open while not rstjpar.EOF par_id«rst_par.Fields("parameter_id") par ame=rstjpar.Fields ("parameter_name") *Response. rite(par_id S "-") 'Response. rite(par_name δ ":") if item_locked("parameter_id",par_id,pid) then ' IF PARAMETER IS LOCKED Response. rite ("<trxtd colspan=3 align=left>" & catjrame & " s " & par_name & " Parameter is Locked</tdX/tr>") else • loop through the observations set rst_obs — server.Createθbject("adodb.recordset") rst_obs.ActiveConnection = cnnl rst_obs.CursorType = adOpenKeyset rst obs.LockType — adLockOptimistic rst_obs.Source — "select * from observations where parametef"_id=" S par_id 5 " and patient_id=" & pid rst_obs.Open while not rst sbs.EOF obs_id=rst abs.Fields ("observation_id") obs_value=rst obs.Fields ("value") if item_locked("observation_id",obs_id,pid) then • IF OBSERVATION IS LOCKED Response.Write ("<trXtd colspan-3 align-left >" S cat_name & " : " & parjname & " Observation is Locked</tdX/tr>") else Response. rite ("<trxtd>" 6 catjname fc "</tdXtd>" S par j name 6 "</tdxtd>" & obs_value & "</tdx/tr>") end if * CLOSE OBSERVATION IF rst obs.MoveNext wend ' close observation loop rst j obs.Close set rstjobs-nothing end if • CLOSE PARAMETER IF rstjpar.MoveNext wend * close parameter loop rstjpar.Close set rst par-nothing end if CLOSE CATEGORY IF rst cat.MoveNext wend * close category loop rstjcat.Close set rst cat-nothing Response.Write("</tableX/bodyXhtml>") cnnl.Close %> <!—finclude file-"adovbs.inc" —> <!—finclude file—"setodbc.inc" —> <% * get the category id and the observation_id from the request cat_id=Request.QueryString("catid") obx__id=Request.QueryString("obxid") if cat_id-null or obx_id-null or cat_id="" or obx ld—"" then Response. edirect "id tnputjpage.asp"," top" end if ~ * extract the patient on which this ip is allowed to work on, from the online table user_ip=Request.ServerVariables ("remote addr") 'set rstjpid-server.CreateObject("adodb.recordset"} aql = "select patient_id from online where userjip like *" s user_ip & "•" rstjpid.Open sql,connobj,adOpenKeyset,adLockOptimistic if not rst pid.EOF then pid-cint(rst ?id.Fields("patient_id")) rstjpid.Close else rs jpid.Close set rstjpid- nothing Response.Redirect ("id_inputjpage.asp") end if * get the observation text set rst j ->bx—server.CreateObject("adodb.recordset") sql=-"select obx_text from observations where obx_id«" s obx Ld & " and patient_id=" S pid & " and category_id=" & cat_id rst_obx.Open sql,connobj, adOpenKeyse ,adLockOptimistic if not rst obx.EOF then obxjext-rstjobx.Fields (0) end if rst_obx.Close set rst_obx-nothing Response.Write (" Coding for observation: " & obx ext) * get the observation codes set rst obc-server.CreateObject("adodb.recordset") sql="select observation coding.code_system_ld, observation coding.code ld,coding systems.coding system_id,coding j systems.coding systemjaame from observationjcoding inner join coding j systems on observationjcoding.codejsystem Ld=cocling system id where observation j coding.observation Ld-"' 5 obx_id 'Response,Write("<br>" & sql S "<br>") rst_obc.Open sql,connobj,adOpenKeyset,adLockOptimistic while not rst_obc.EOF obc_text="<br> code system name : " 6 rst abc.Fields ("codingj3ystera_name") β " ... code :" & rstjobc. Fields("code_id") & "~ " <br>" ~ Response.Write(obc_text) . rst_obc.MoveNext wend rst_obc.Close set rst_obc=nothing Response. End *> <RTML> <HEAD> <META NAME-"<3ENERATOR" Content="Microsoft Visual Studio 6.0"> TITLEX/TITLE> C/BEAD> CB0DY> <:P>finbsp;</P> </B0DY> </HTML> <HTML> <HEAD> <META http-equiv-"Expires" content-"Tue, 20 Aug 1996 14:25:27 GMT"> <TITLEX/TITLE> </HEAD> <frameset rows—"100,*"> <frame name—"top fra e" src="logo ?age.asp" border—0> <frameset cols-"35%, 65%"> <frame name-"left frame w src-"skeleton.asρ" border—1> * <frame name-"right framβ" src—"viewjpatient.asp" border-l> </frameset> </fraraeset> </HTML> <!—finclude file-"adovbs.inc" —> <!—tinclude file—"setodbc.inc" —> <% • get the category id from the left frame ( skeleton,asp ) cat_id=Request.QueryString("id") cat_name » =Request.QueryString("catjαame") if cat_id=null or cat_id»"" then Response.Redirect("id tnput page.asp") end if ' extract the patient on which this ip is allowed to work on, from the online table user_ip-Request.ServerVariables("remote addr") set rstjpid-server.CreateObject("adodb.recordset") sql — "select patient_id from online where user ip like '" & user_ip & "•" rs jpid.Open sql, connob ,adOpenKeyset,adLockOptimistic if not rst pid.EOF then pid-cint (rstjpid.Fields("patierit_id") ) rstjpid.Close else rstjpid.Close set rstjpid=» nothing Response.Redirect ("idjlnputjpage.asp") end if %> <HTML> <HEAD> <META NAME-"GENERATOR" Content-"Microsoft Visual Studio 6.0"> <TITLEX/TITLE> </HEAD> <BODY background-backgrnd.gif > <% rstjpid.Open "select value from pid j data where patient ld-" & pid & " and item_id<3", connobj, dOpenDynamic,adLockOptimistic if not rstjpid.EOF then rstjpid.Movelast Response.Write "<center>Patient: <strong>" 6 rstjpid.Fields (0) rstjpid.Movefirst Response.Write( " " δ rstjpid.Fields (0) t "</strong>δnbsp δnbsp δnbsp&nbsp δnbsp δnbsp δnbsp Category: <strong>" δ catjαa e) end if rstjpid.Close set rstjpid-nothing Response.Write ("<hr width-90% noshade>") %> <form action=processjnew_observation.asp method=ρost name— new_obx> <input type-hidden name=pid value-<%=pid%» <input type-hidden name=cat_id value— <%=catjld%» <input type-hidden name-catjname value— <%-cat_name%» <table cellspacing-2 cellpadding-4> <trxth width-10% >δnbsp</tbxth width=20% align=left>Observation: 6nbspSnbsp</thxtd width-60%xtextarea name-obx j val width=80 rows-3 cols-40x/textareax/tdxth width-10% >δnbsp</thx/tr> <trxth>δnbsp</thxth alig^ » left>Time:δnbspδnbsp</thXtdXinput name^obx time width-80 value-"<%«FormatDateTime (now( ) , 0) %>"x/tdx/tr> <! — Getting observation system <trxth>δnbsp</thxth align-left>Coding System: δnbspδnbsp</thXtdxSELECT id— selectl name-code system> <% ~ set rst2=server.CreateObject("adodb.recordse ") sql-"select * from codingjsystems" xst2.Open sql,connobj,adOpenKeyset,adLockOptimistic while not rst2.EOF Response. rite("<option value-" δ rst2.Fields("coding 3ystem_id") & ">" fi rst2. ields ("coding_system_name") & "</option>") " ~ rst2.MoveNext wend rst2.Close set rst2=nothing %> </SELECTX/tdX/tr> <trxth>δnbsp</thxth align=left>Code Value: 6nbspδnbsp</thXtdXinput name=code_value width=40x/tdX/tr> —> </table> <br clear=all><centerXinput type-submit value—"Register New Observation"XbrXbrX/centerXhr width=90% noshade> </form> <% "load any existing observations for this patient into the rstl recordset set rstl=server.CreateObject("adodb.recordset") sql="select * from observations where patient_id=" δ pid & " and category_id-" δ cat_id rstl.Open sql,connobj,adOpenKeyset,adLockOptimistic if rstl.EOF then Response.Write("<li> No Observations recorded in this category") else %> * <form name— edit_obx method*ρost action=process_delete_observation . aspXcenter> <input type=hidden name=pid value-<%=pid%» <input type-hidden name=cat_id value»<*=cat_id%» <input type-hidden name-catjname value»<%=catjname%» <table border=l width-90% > <trxth>Delete</thxth>Existing Observations</thXth>Time</thxth>Coding</thX/tr> <% while not rstl. EOF Response. Write ("<trxtd align-centerxinput type-checkbox name-c" δ rstl. ields ("obx id") δ "X/inputx/td>") Response. rite ("<td>" & rstl. Fields ("obx text") s- "</td>") Response .Write ("<td>" δ rstl. Fields ("obxjtime") δ "</td>" ) •Response. rite ("<tdxcenterxinput type=button name-b" s rstl. Fields ("obx_id") & " value-" "Edit.. ."" x/tdx/centerX/tr>" & chr(lθ) ) url-"edit_codes_l.asp?obxid-" δ cstr (rstl. ields ("obx j ld") ) & "δcatid-" δ cat ld %> <tdxcenterxinput type-button name-"b<%-rstl.Fields ("obx_id") %>" value-"Edlt..." language-javascript onclick-"window.open( , <%-url%> , ) M, > <% rstl. MoveNext wend %> </tableXcenterXbr clear-allxinput type-submit value-"Delete Observations"x/center> </form> <* end if rstl.Close set rstl-nothing %> </BODY> </HTML> <t—finclude file—"adovbs.inc" —> <!—#include file="setodbc.inc" —> <% dim arr() ' (0,0) holds the number of items in the array • (0,x) holds the itemJLd ' (l,x) holds the item j αame • (2,x) holds the previous value provided by the ip in previous sessions >******************************************************************************* ************** • this function loads the items and their names a blank array named arr() Function get pid_items() •dim cnn dim rst dim counter set rst = server.CreateObject ("adodb.recordset") •rst.Open sql, "FILEDSN-cardionet.dsn", adOpenDynamic sql—"select * from pid_items" rs .Open sql, connobj, adOpenDynamic rs .MoveFirst counter — 0 while not rst.EOF counter — counter + 1 redim preserve arr(3,counter+l) arr(0,counter) = trim(cstr(rst.Fields ("item_id") .value)) arr(l, counter) = trim(cstr(rst.Fields ("item_name") .value)) rst.MoveNext wend rs .Movefirst if counter > 0 then , ReDi arr(2,counter+l) for x — 1 to counter arr(0,x) = Trim(CStr(rst.Fields ("itemjid") .Value)) arr(l,x) = Trim(CStr(rst.Fields ("itemjname").Value)) rst.MoveNext next arr(0, 0) - CStr (counter) get_pid_items — true else getjpid_items — false end if rst.close Set rst— Nothing session. bandon () End Function ******************************************************************************** ************** * this sub loads the array with the previous values entered by the same ip user to the arr() array sub load_existing_values{) user_ip — trim(cstr(Request.ServerVariables("remotejaddr") )) set rst_l— server.CreateObject ("adodb.recordset") counter-cint(arr(0,0)) for x — 1 to counter sql « "select itera_value from request data where ( (userJLp " Like ' " S user ip S "•) and (item_id-" 6 cint(arr(0,x)) δ ")}" 'Response.Write("<br>" δ sql) rst_l.Open sql,connobj,adOpenKeyset,adLockOptimistic 'Response.Write (rst_l.RecordCount ) if not (rst_l.EOF) then arr(2,x)-rst_l.Fields ("item_value") 'Response.Write("hello " δ arr(2,x)) else arr(2,x)-null end if rst_l.Close next set rst_l=nothing end sub *********** ' this sub generates the actual HTML grid with the values if they exist in the arr() array Sub export tml() Dim x x-0 itemsjperjLd — arr length - cint (itemsjperjLd(0, 0)) Response.Write( "<centerXstrongxfont size=4 color=#0000ff>CareKey Patient Identification Page</fontx/strongxhr>") Response.Write("<form action-""process Ld lnput.asp"" method-post>") Response.Write ("<input type-hidden name=""count"" value—""" δ CStr(length) S """x/input>") Response.Write("<table cellpadding-1 cellspacing-0 border—1>") Response.Write("<tr bgcolor=#00008bxth>βnbsp ID δnbsp </thXthXfont color=#ffff00>ltem Name</thxthXfont color-#ffff00>lnput</thxth>δnbsp</thxth>finbsp ID δnbsp</thXthXfont color=#ffff00>ltem Name</thxthxfont color-#ffff00>lnput</thx/tr>") For x - 1 To Int(length / 2) Response.Write ("<trxth>" fi itemsjperjLd(0,x) δ "</thxtd>" & itemsjperjLd(l,x) δ "</td>") Response.Write ("<tdxinput name-"""' δ item3_per_id(0,x) δ """ size-20 value-""" & itemsjper_id(2,x) δ """x/inputx/td xtd bgcolor=#00008b>δnbsp</td>") Response.Write ("<th>" δ itemsjperjLd(0,x + Int (length / 2)) & "</thxtd>" 6 itemsjperjLd(l,x + Int (length / 2)) δ "</td>") Response. Write ("<tdxinput name-""" S items jper_id(0,x + Int (length / 2) ) δ """ size-20X/inputx/tdXtr>") Next If (x - 1) * 2 < length Then Response .Write (" trxthx/thxtdx/tdxtdx/tdxtd bgcolor^fediumAquamarineX/tdxth>" & itemsjper j Ld (0, length) δ "</thXtd>" δ itemsjperjLd (1, length) δ "</td>") Response.Write ("<tdxinput name-""" δ items jper_id(0, length) δ """ size-20x/inputx/tdx/tr>" ) End If Response. Write ("</tableXbrXinput type-" "submit"" value-" "Attempt Unique Identification" "X/f orm>" ) End Sub I******************************************************************************* ********* ' HTML CODE STARTS HERE %> <html xheadxfont size-3 face-sans-serif> <META http-equiv-"Expires" content-"Tue, 20 Aug 199614:25:27 GMT"> <TITLE>Carekey Patient Identification Page</TITLE> </HEAD> <body background=backgrnd.gif> <% if getjpidjltems () then call load_existing_values call export_html end if connobj .close set connobj-nothing %> <HR N0SHADE> </BODY> </HTML> <»DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FTNAL//EN"> <HTML> <HEAD> <script language—"javascript" for—"window" event—"onload"> </script> <font size-2 face=serif> <script language-"javascript"> var html text-"; var toggϊe-false; var depth-1000; var next_sib; var vpos=0; var vmax-1; var temp αode; var xmldoc-new ActiveXObject("Microsoft.XMLDOM"); xmldoc.load("make_dtd.asp") ; loaddoc(); function loaddoc () { if (xmldoc.readyState—"4") { start (); window,section.innerHTML=html_text; } else window.setTimeout("loaddoc()" , 200 ); } function start() { var root=xmldoc.documentElement; stratify(vpos,root) ; } function stratify(vpos,node) { if (vpos<depth) { nodejname-node.nodeName; if (nodejnam^ != *#text') node att-node.attributes(O) .text else node_att=node.nodeName; node_text=node.text; if (nodejtext != " || toggle )( taber-"; for (x=0;x<vρos;x++) taber-taber 'δnbspδnbspδnbspδnbspδnbspδnbspδnbsp*; if (nodejname—*ob ' ) { local_html=taber+•δnbspδnbspδnbspδnbsp<font color-"0000ff">'+nodejtext+•</fontXbr>'+String.fomCharCode(10) html_text==html_text+local html; ) else { if (node.hasChildNodesOH local_html=taber+•<label onclick-documen .all(" '+node ame+*") .style-.display="none"Xβnbsp</label>'; local_html-local_html+ • <label onclick— document . all ( " ' +nodejname+ • " ) . style . display="block">»</label> ' ; } else local jTitml=taber+ ' δnbsp&nbspδnbspδnbspδnbsp* ; if (node text !-") local_html=local_html+ * <strongXf ont color»"f f 0000"> ' +node_att+ ' </f ontx/strongXbr> » else local_html-local_html+ * <strongXf ont color-"808080">'+node_att+'</fontx/strongXbr>' ; local_html-local_html+ • <div id»"'+node_name+' "> , +String.fromCharCode(10) ; ~ " html text-html_text+local_html; if (node.hasChildNodes() ) { if (vmax<vpos) vmax-vpos; stratify (vpos+1, ode. childNodes (0) ) ; taber—' ' ; for (x-0;x<vpos;x++) taber— aber* • ' ; 1 html_text=html_text+ * </div> • +String . f romCharCode ( 10 ) ; } > temp_node=node.nextSibling; if (temp_node != null δδ tempjαode.nodeName != ' lcomment' ) stratify(vpos,tempjuode) ; } > function toggle_empty(){ toggle—toggle; htmljtext-' • ; stratify(0,xmldoc.documentElement) ; window.section.innerHTML-htmljtext; ) function display(flag) ( vaiT root-xmldoc.documentElement; if (flag—1){ show(root); } if (flag—2) { hide(root) ; ) > function hide(node).-{ node_name=node.nodeName; if {node_name!=^bx , δ node_name!-'#text*){ if ( document. all (nodejαame) .-null) document . all (nodejαame ) . style . display-"none" ; > if (node.hasChildNodes () ) { hide (node.childNodes (0) ) ; > temp aode-node.nextSibling; if (tempjoode !— null δδ tempjaode.nodeName !*» 'fcomment' ){ hide(tempjαode) ; ~ } } function sho (node) { nodejαame-node.nodeName; if (node iameJ-'obx' 6δ node_name!=»'#text'){ if (document.all(nodejname) !-null) { document.all(node name) .style.display-"block"; } 1 if (node.hasChildNodes()) { show(node.childNodes (0) ) ; } tempjaode-node.nextSibling; if (tempjαode !- null δδ temp_node.nodeName !=* 'fcomment' ){ show(temp ode) ; ) > </script> </HEAD> <body background-backgrnd.gif> <!—<body background=backgrnd.gif> —> <center> <input name="showit" value—"Show All" type—"button" onclick—"display(l)">δnbsp <input name-"hideit" value="Hide All" type-button" onclick—"display(2) ">βnbsp <input name-"toggle" value="Toggle Empty" type—"button" onclick="toggle_empty() ">δnbsp <input name-"Id_Page" value="Back to ID page" type—"button" onclick—"window.open{'id Lnputjpage.asp', ' top*) "> <input name-"frames" value-"Data Entry" type—"button" onclick»"window.open{ 'framejset^.asp' , 'jtop* ) "> </center> <brxhr noshade width=80%Xbr> <div id-"section"x/div> </BODY> </HTML> <!—finclude file="adovbs.inc" —> <!—finclude file="setodbσ.inc" —> <% dim a() dim user id ******************************************************************************** ************* • this function creates the SQL that finds the unique match using the data in the array ' returns negative number is no matches, 0 if many matches, patient Ld if unique match ~ Function get pid Ld() dim rst dim counter set rst — server.CreateObject ("adodb.recordset") partO - "select distinct patient_id from pid j data where ((1-1) " parti — " and ( " — part2 - " patientjid in (select patient_id from pid j data where itemJLd—" part3 — " and value like '" part4 - "'))" part5 - ")" sql — partO for x = 1 to cint (a(0,0)) sql - sql + parti + part2 + a(0,x) + part3 + a(l,x) ■ *- part4 next sql— sql + part5 'Response.Write (sql) rst.Open sql, connobj 'Response. rite(sql) if not rst.EOF then rst.MoveFirst counter = 0 while not rst.EOF counter - counter + 1 ' esponse.Wr te( "<br>patient found:" + cstr(rst.Fields ("patientJLd") .value)+ "<br>") rst.MoveNext wend "Response.Write("<br>counter:" S counter ) if counter —1 then * patient matched rst.MoveFirst get pid_id — rst.Fields("patientJLd") .value end if if counter < 1 then ' no patients match getjpidJLd » -1 end if if counter >1 then ' too many patients match getjpid_id - 0 end if set rst- Nothing session.Abandon () End Function I******************************************************************************* **************** • this sub loads the requestjdata table with the entries in the form sub updatejdataJbase_with_user_request() dim time_stamp dim num_of_items dim rstl dim counter user_id - trim(cstr(Request.ServerVariables("remote_addr"))) * ip address time j stamp - cstr(no ().) • time stamp counter - 0 length - cint(Request.Form("count")) • number of fields to extract from request form ' remove old entries for this ip set rstl — server.CreateOb ect ("adodb.recordset") rstl.CursorType- adOpenDynamic sql — "delete from requestjdata where user_ip like '" S userJLd 6 "•• * clear database from previous attempts rstl.open sql, connobj set rstl — nothing •set cnnl «• server.CreateObject("adodb.connection") 'cnnl.Open "filedsn-cardionet.dsn" set rst2 — server.CreateObject ("adodb.recordset") rst2.ActiveConnection - connobj rst2.CursorType — adOpenKeyset rst2.LockType — adLockOptimistic rst2.Source = "request j data" rst2.0pen for x - 1 to length * loop through items if len(cstr(Request.Form(cstr(x))) )>0 then * append only items that have a value enetered counter — counter + 1 redim preserve a(2,counter) ' redim works only on last dimension, note it is turned around ' ,30 a (0,counter) — cstr(x) * item id a (1,counter) = lease(trim(Request.Form(cstr(x)))) • item value rst2.AddNew ' add a record for each entered item rst2("user_ip") = user_id rst2("ltem_id") = a(0, counter) rst2("item_value") - a (1,counter) rst2 ("timejstamp") = timejstamp rst2("session_id") - cstr(session.SessionID) rst2.update end if next rst2.Close 'cnnl.Close set rst2-nothing •set cnnl-nothing a(0,0) — cstr(counter) end sub t ***************A**********************************************************.****** ************** • this funciton checks to see if the items specified by the patient as required to his • identification are indeed provided, the list of those items are in table idjpass and • the items provided are in table requestjdata function checkJLdjpass (pid) 'set cnn4 - server.CreateOb ect("adodb.connection") 'cnn4.0pen "filedsn-cardionet.dsn" user_ip— trim(cstr(Request.ServerVariables ("remotejaddr") ) ) set recset- server.CreateObject("adodb.recordset") recset.ActiveConnection — connobj recset.CursorType — adOpenKeyset recset. ockType — adLockOptimistic * the following sql returns the item_id that were not provided and are necessary for authorization sqlO="select itemjαame from pidjLtems where itemjLd in " sqll-" (select itemjLd from idjpass where (patient ld-" δ pid δ ")" sql2—"and itemjLd not in " sql3—"• (select itemjLd from request j data where userJLp like '" S user Lp δ "'))" recset.source-sqlO S sqll S sql2 δ sql3 recset.Open if recset.RecordCount>0 then * patient security specs are not met checkJLd_pass-0 Response. rite ("<hrXbrXlixfont size=2 color=f0000cdxstrong> For this patient, access will be authorized upon furnishing the following information: </font>") *Response.Write(recset.RecordCount ) while not recset.eof Response.Write("<br><li>" fi recset. ields ("itemjname") ) recset. ovenext wend Response.Write ("<brx/font>") else checkJLdjpass=l ' patient security is OK end if recset.close • cnn4.Close set recset-nothing • set cnn4=nothing end function *****************************************************************************ι,t* ******* ' thi3 sub updates the online table with the access granted for this ipjαser for this patient sub update j online (user, patient) set rst5 — server.CreateObject("adodb.recordset") • set cnnS — server.CreateObject("adodb.connection") 'cnnS.Open "filedsn-cardionet.dsn" sql—"delete from online where user_ip like '" S user δ rstδ.Open sql,connobj set rstβ — server.CreateObject("adodb.recordset") rst6.ActiveConnection — connobj rstβ.CursorType » adOpenKeyset rst6.LockType — adLockOptimistic rst6.Source - "online" rst6.Open rstβ.AddNew rst6("userJLp")-user rst6("patientJLd")-patient ' rst6("time stamp")-now() rst6.Update rs 6.Close * cnn5.Close set rstβ-nothing set rst5-nothing ' set cnn5-nothing end sub ******************************************************************************** ******* t ********************* PROGRAM S TART *********************************** t ***************************************************************** * *************** ******* call update j databasejwithjαser request p = get_pid Ld ' calling the patient matching function •Response.Write ("<hr>" δ cstr(a(0,0)) δ "δnbsp items provided by ip user " δ user_id δ "<brxhr>") pJLnt-cint (p) if p_int>0 then sedbre=check_idjpass (cstr(p) ) if secure—1 then updatejOnline user_id,p_int ' update the online table with the new access provision •Response.Write("patient identified:" δ p_int) *response.redirect("data root.asp") •Response.Write("You now have access to patient " & p tnt ) Response.Redirect("viewjpatient.asp") else %> <html> - <head> </head> <body background=backgrnd.gif> <brxcenterxhr noshade width-80%X/center> <br clear— all> <% Response.Write ("<br>Access requirements not met for the identified patient: " & p) end if end if if p_int<0 then Response.Write ("<li>δnbsp No Matching patients found. Attempt identification again using validated data only.") if p_int-0 then Response. rite ("<li>δnbsp More than one patient found.Try adding or changing patient information.") 'if p_int>0 then checkJLdjpass(cstr(p) ) %> <centerxbrxbr> <a href-"idJLnputjpage.asp">Back to Identification Page</a> "<P>δnbsp;</P> < BODY> </HTML> <8 — include file="adovbs.inc" — > <! — finclude file="setodbc.inc" — > <% pid-Request . For ( "pid" ) obx_value-Request . Form ( "obx_val " ) obx time— eques . Form ( "obxjtime" ) code j system-Request . Form ( "code j syst m" ) code value-Request . For ("code value" ) cat_id-Request . Form ( "catJLd" ) cat_name-Request . Form ( "catjaame" ) if obx value-"" then Response. edirect("get data.asp?id=" δ cat id & "δcat name-" β cat name) end if ~ ~ ~ if not(isdate(obxjtime) ) then obx time-now() end if 'Response. rite("<br>" δ pid & "<br>" δ obxjvalue δ "<br>" δ obxjtime fi »<br>*' C codejsystem fi "<br>" δ codejvalue fi "<br>" δ " cat_id ) 'Response.End „ — set rst=server.CreateObject("adodb.recordset") rst.open "observations",connobj, adOpenKeyset,adLockOptimistic rst.AddNew rst ("patient ld")-=pid rst ("obx_text")=obx_value rst ("obxjtime")-obxjtime rst ("category Ld")—catJLd rst.Update obxjid- rst. Fields("obx_id") rst.Close • this is part of the old interface where coding was entered as part of the observation •rst.open "observationjcoding",connobj, adOpenKeyset,adLockOptimistic 'rst.AddNew rst ("observationJLd")=obxJtd rst ("code_system_id")—code j system rst ("code_id")-code ralue •rst.Update •rst.Close set rst—nbthing Response.Redirect("get_data.asp?id=" & cat Ld δ "δcatjαame-" & catjaame) %> <!—finclude file-"adovbs.inc" —> <!— include file="setodbc.lnc" —> <% » extract the patient on which this ip is allowed to work on, from the online table user_ip=Request.ServerVariables ("remotejaddr") set rstjpid-server.CreateObject("adodb.recordset") sql — "select patient_id from online where userJLp like '" 6 userJLp fi "'" rstjpid.Open sql,connobj,adOpenKeyset,adLockOptimistic ~~ if not rstjpid.EOF then pid-cint (rstjpid.Fields("patientJLd") ) rstjpid.Close set rstjpid— nothing • else rstjpid.Close set rstjpid- nothing Response.Redirect("id Lnputjpage.asp") end if I******************************************************************************* **** * check if either a category or an observation is locked for this patient function itemJLocked(fld aame, fld value) • fldjaame should be either "observation ld" or "categoryJLd" ' fld value should contain the id of the item required weather an observation or a category set rst_chk=server.CreateObject ("adodb.recordset") sql—"select distinct itemjLd from locks where (patient_id=»" δ cint(pid) 6 " and " δ fldjaame δ "=" δ cint(fld_value) sql— sql S ") and itemjLd not in { select distinct itemjLd from request j data where user_ip like ' " δ • userJLp δ "• ) " rst_chk.Open sql,connobj,adOpenKeyset, adLockOptimistic if rst_chk.EOF then itemJLocked — false else ^ itemJLocked = true end if ' rst_chk.Close set rst_chk=nothing end function if item_locked("category_id",19)then Response.Write("locked") else Response.Write("not locked") end if **** sub stratify_dtd(itemjLd,name,level) • generate the DTD from the table categories set rst-server.CreateObject("adodb.recordset") sql-"select * from categories where categoryjparent id-" fi item j Ld rst.Open sql,connobj,adOpenDynamic,adLockOptimistic tabber-"" for x =1 to level tabber-tabber fi " " next if rst.EOF then Response.Write(chr(10) & tabber δ "<!ELEMENT id" fi itemjLd fi » (obx*)>") Response.Write(chrdO) fi tabber fi "<!ATTLIST id" & itemjLd fi " name CDATA """ fi name δ """>") else Response. rite (chr (10) fi tabber fi "<! ELEMENT id" fi itemjLd fi " (obx*, ") while not rst. EOF local Ld-rst. ields("categoryJLd") Response.Write( "id" δ locaϊJLd & "*") rst.MoveNext if not rst.EOF then Response.Write(", ") end if wend Response.Write(" )>") Response.Write(chr(10) & tabber δ "<!ATTLIST id" δ itemjLd δ " name CDATA """ δ name δ """>") rst.MoveFirst level-level+1 while not rst.eof • Response. rite(" , stratify level " & level fi ":" δ rst.Fields ("categoryJLd") ) cat Ld=rst.Fields ("categoryJLd") catjaame-rst.Fields("categoryjαame") call stratify_dtd(catjid,catjaame,level) ' recursion origin rst.MoveNext wend ^ level=level-l end if rst.Close set rst-nothing end sub *********** sub stratify xml (itemjLd,name,level) ' produce the actual XML data tabber—"" for x -1 to level tabber-tabber δ " " next ' check if this category is locked, in which case write the category name as empty and exit this branch if itemJLocked("categoryJLd",itemjLd) then Response.Write(chrdO) δ tabber δ "<ld" fi itemjLd & " name-""" fi name fi "_Locked" fi »■» />") exit sub end if set rst— server .CreateOb ec ("adodb.recordset") set data-server. CreateOb ect ("adodb.recordset") sql— "select * from categories where categoryjparentJLd— " fi itemjLd rst. Open sql, connobj, adOpenDynamic, adLockOptimistic • check for data of this node sql-"select * from observations where categoryJLd-" fi itemjLd fi " and patientJLd-" fi pid fi " order by obxjtime" data . Open sql, connobj , adOpenDynamic, adLockOptimistic if rst. EOF then * if the parent node has no children.. . check for data. ... if data. EOF then • if no data, close the node Response.Write(chr(10) & tabber fi "<id" s itemjLd 6 " name-""" * name fi " » "/>") else Response.Write(chr(10) fi tabber & "<id" fi itemjLd fi " name-""" δ name δ """> » ) while not data. EOF ' if it has data, but no children, load it and then close the node obs_id=cint(data.Fields ("obx_id") ) obsjtxt-data.Fields ("obxjtext") if item_locked("observationJLd",obs_id) then obs_txt="Observation Locked" end if Response. rite(chr(10) δ tabber δ " " δ "<obx obxJLd-""" δ data.Fields("ob JLd") δ "" » >") Response. rite (obs_txt δ "</obx>") data.MoveNext wend Response. rite(chr(10) s tabber δ "</id" δ itemjLd δ ">") end if else * if the parent node has children... check for data.... Response.Write(chr{10) δ tabber δ "<id" fi itemjLd & " name-""" δ name δ « " » >") •print out all the obxs of the root element if they exist while not data.EOF ' if it has data, print it. obs_id=cin (dat .Fields("obx_id") ) obs_txt=data.Fields ("obxjtext") if itemJLocked("observation_id",obs_id) then obs txt-" Observation Locked " end if Response.Write(chrdO) fi tabber fi " " δ "<obx obxJLd-""" δ data.Fields ("obxJLd") fi """>") Response. Write (obsjtxt 6 "</obx>") data . MoveNext wend data. close level=level+l * and then drill down to the child nodes while not rst.eof catjid-rst. ields("categoryJLd") catjname-rst.Fields("categoryjαame") call stratify_xml(catjld,catjaame,level) 'recursion origin rst.MoveNext wend Response.Write(chr(10) & tabber fi "</id" & itemjLd fi ■ >") level-level-1 end if rst.Close set rst-nothing set data-nothing end sub INIT XML PAGE WITH INTERNAL DTD Response. rite("<?xml version-""1.0""?>" fi chr(lθ)) Response.Write("<!DOCTYPE idl [» C chr(10)) Response.write ("<IELEMENT obx ( CDATA)>" fi chr(10)) Response.Write("<!ATTLIST obx" fi chr(10)) Response.Write(" obx Ld CDATA EQUIRED" 6 chr(10)) Response.Write(" code syβ id CDATA ""ICD9""" fi chr(10)) Response.Write(" code Ld CDATA ""134.18""" fi chr(10)) Response.Write(">") Response. rite(chr(10) fi chr(10)) CALL THE PROCEDURE THAT CREATES THE DTD ACCORDING TO THE DATABASE call stratify dtd (l,"xmlnet",0) Response.Write(chr(10) & "J>" δ chr(10)) CALL THE PROCEDURE THAT GENERATES THE ACTUAL XML DATA DOCUMENT • Response.Write(chr(10) fi chr(10)) call stratify_xml(1, "xmlne ",0) %> <! — finclude file-"adovbs.inc" — > <! — finclude file»"setodbσ.inc" — > <% pid— Request . For ( "pid" ) obxjralue— Request . Form ( "obx val " ) obxjtime—Request . Form ( "obxjtime") codejsyst em-Request . Form ( "code_system" ) code_value-Request . orm ( "code_value") cat_id-Request . Form ( "catJLd" ) cat jaame— Request . Form ( "catjaame" ) if obx value— "" then Response. edirect ("get_data.asp?id»" fi cat id fi "ficatjname-" fi cat name) end if if not (isdate (obxjtime) ) then obxjtime-now ( ) end if • Response.Write("<br>" fi pid & " br>" & obxjvalue fi "<br>" fi obxjtime fi **<br>" fi codejsystem & "<br>" fi codejvalue 6 "<br>" fi catJLd ) ~ • Response . End set rst=server . CreateObj ect ( "adodb . recordset" ) rst . open "observations" , connobj , adOpenKeyset, adLockOptimistic rst.AddNew rst ( "patient JLd" ) -=pid rst ("obxjtext" ) «-obx_value rst ( "obxjtime" ) —obxjtime r st ( "category_id" ) =cat_id rst. Update obx Ld- rst.Fields ("obxJLd") rst.Close * this is part of the old interface where coding was entered as part of the observation 'rst.open "observationjcoding",connobj,adOpenKeyset,adLockOptimistic 'rst.AddNew rst ("observationJLd")-obxJLd rst ("code_systemJLd")—code j system rs ("code_id")-codejvalue 'rst.Update •rst.Close set rst=nothing Response.Redirect("get_data.asp?id=" & catJLd fi "ficatjaame—" & catjaame) %> <HTML> <HEAD> <MBTA NAME-"CareKey System Demo" Content-"Center for Clinical Computing, Harvard Medical School"> <TITLE>CareKey Demo</TITLE> </HEAD> <BODY background-backgrnd.gif> <font size » 5 color-f00008bxstrongxCenter> <a href-"idJLnpu jpage. asp" > <img name-"imgl" src— "bidmc-banner.gif" border-0 width-90% > </a> </BODY> </HTML> <!—finclude file-"adovbs.inc" —> <!—finclude file="setodbc.inc" —> <% sub stratify itd(itemjLd,name,level) * generate the DTD from the table categories set rst-server.CreateObject("adodb.recordset") sql="select * from categories where categoryjparent_id=" fi itemjLd rst.Open sql,connobj,adOpenDynamic,adLockOptimistic * tabber-"" for x —1 to level tabber-tabber fi " " next if rst. EOF then Response. rite(chr(10) fi tabber fi "<! ELEMENT id" fi item id fi " (obx*)>") Response.Write(chrdO) fi tabber fi "<!ATTLIST id" S itemjLd ) Response. rite (chr (10) & tabber & " name CDATA """ fi name fi •»"») Response.Write(chr O) δ tabber fi " catJLd CDATA """ fi item id. fi „ . Response.Write(chr(10) ) else Response. rite(chr(10) & tabber fi "<!ELEMENT id" fi item_id fi " (obx*,") while not rst.EOF localjLd=rst.Fields("categoryJLd") Response.Write ( "id" δ localJLd δ "*") rst.MoveNext ~ if not rst.EOF then Response.Write(", ") end if wend Response.Write(" )>") Response. rite(chr(10) δ tabber δ "<!ATTLIST id" δ itemjLd ) Response.Write(chr(10) δ tabber 6 " name CDATA """ fi name fi """") Response.Write (chr(10) δ tabber δ " catJLd CDATA """ δ itemjLd δ '">") Response.Write(chr(10) ) •Response.Write{chr(10) δ tabber δ "<!ATTLIST id" fi itemjLd fi " name CDATA ""* & name δ """> » ) rst.MoveFirst level-level+1 while not rst.eof • Response.Write(" ,stratify level " δ level δ ":" δ rs .Fields("categoryJLd") ) catJLd-rst.Fields ("categoryJLd") ca aame-rst.Fields ("categoryjαame") call stratifyjdtd(catJLd,catjaame,level) ' recursion origin rst.MoveNext wend level-level-1 end if rst.Close set rst-nothing end sub t******************************************************************************* *********** sub stratif_xml (itemjLd,name,level) ' produce the actual XML data tabber-"" for x —1 to -level tabber-tabber fi " " next set rst-server.CreateObject("adodb.recordset") set data-server.CreateObject("adodb.recordset") sql—"select * from categories where categoryjparentJLd—" & item_id rst.Open sql,connob ,adOpenDynamic,adLockOptimistic if rst.EOF then * if the parent node has no children... Response.Write(chr(10) & tabber & "-cid" fi itemjLd fi " name—""" & name & ■»» /> ■ ) else ' if the parent node has children... check for data.... Response.Write(chr(10) fi tabber δ "<id" δ itemjLd fi " name-""" fi name fi »» • » >• » ) •print out all the obxs of the root element if they exist level=level+l • and then drill down to the child nodes while not rst.eof catJLd-rst.Fields ("categoryJLd") catjαame-rst. ields ("categoryjαame") call stratify_xml (catJLd,catjaame,level) 'recursion origin rst.MoveNext wend Response.Write(chr(10) δ tabber δ "</id" δ itemjLd δ ■ >") level=level-l end if rst.Close set rst=nothing set data—nothing end sub ' INIT XML PAGE WITH INTERNAL DTD Response."Write("<?xml version-""1.0""?>" fi chr(10)) Response.Write("<!DOCTYPE idl t" δ chr (10)) Response. rite("<!ELEMENT obx (fPCDATA)>" δ chr(lθ)) Response.Write (chr(10) δ chr (10)) • CALL THE PROCEDURE THAT CREATES THE DTD ACCORDING TO THE DATABASE - call stratifyjdtd (1, "xmlnet",0) Response.Write(chr O) δ "]>" δ chr(lθ)) . CM,!, THE PROCEDURE THAT GENERATES THE ACTUAL XML DATA DOCUMENT Response. rite(chr (10) & chr (10)) call stratify_xml(l,"xmlnet* , ,0) %> <!—finclude file="adovbs.inc" —> <!—finclude file—"setodbc.inc" —> <% dim arr() counter=0 pid=Request.Form("pid") catJLd-Request.Form("catJLd") catjname-Request.Form("catjaame") set rstl-server.CreateObject("adodb.recordset") sql-"select obxjLd from observations where patient_id-" fi pid & " and categoryJLd—" fi catJLd rstl.Open sql,connobj,adOpenDynamic,adLockOptimistic while not rstl.EOF obxid-rstl.Fields ("obxJLd") cname-"c" δ obxid checkid-Request.Form(cname) if checkido"" then counter-counter+1 redim preserve arr(counter+l) arr(counter)-obxid • Response. rite(obxid δ "<br>") rstl.Delete adAffectCurrent rstl MovePrevious end if rstl.MoveNext wend •Response.Write("<br>" & pid S "<br>" & catJLd ) rstl.Close sql-"" sql-"delete from observation_coding where observationJLd in (" for x — 1 to counter sql—sql fi arr(x) fi "," next sql=sql δ "0)" 'Response. rite (sql) rstl.open sql,connobj,adOpenDynamic,adLockOptimistic ' recordset closes automatically after deletion set rstl—nothing ^ Response.Redirect("get_data.asp?id=" δ cat_id δ "δcatjaame-" δ catjaame) %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN"> <HTML> <BEAD> <font size—2 face=serif> <scriρt language—"javascript"> var htmljtext—"; var toggle-false; var depth-1000; var next_sib; var vpos-0; var vmax-1; var tempjftode; var cat_id; var xmldoc-new ActiveXObject("Microsoft.XMLDOM"); xmldoc.load("preparejskeleton.asp") ; loaddoc(); function loaddoc () { if (xmldoc.readyState—"4") { start(); window,section.innerHTMIr-=html text; ) else window.setTimeout("loaddoc()" , 1000 ); > function start () { var root=xmldoc.documentElement; stratify(vpos,root) ; ) function stratify(vpos,node) ( if (vpos<depth) { nodejaame-node.nodeName; if (node_name !— 'ftext') node_att=node.attributes (0) .text else ^ nodejatt-node.nodeName; node_text=node.text; taber-"; for (x=0;x<vpos;x++) taber=taber+'SnbspSnbspSnbspδnbspSnbsp&nbspδnbsp*; if (node.hasChildNodes ()){ localJit-ml-taber-"-'finbspSnbspfinbspfinbspSnbsp' ; cat id=node.attributes (1) .text; localjtml-local_html+*<strongXfont color » "fOOOOff">'+nodejat:+'δnbspδnbsp<a target="right j frame" href-"get_data.asp?id-•+cat_id+•δcatjaame-•+node_att+• ">x/ax/fontx/strongxbr >'; local itml-local »tml+'<div id-"'+nodejaame+ » ">'+String.fromCharCode(10) ; html text-htmljtext+localjtml; if (node.hasChildNodes() ) { if (vmax<vpos) v ax—vpos; stratify(vpos+1,node.childNodes (0) ) ; taber-' ' ; for (x=0;x<vpos;x++) taber-taber+' •; } htmljtext-html_text+•</div> » +String.fromCharCode(10) ; tempjaode-node.nextSibling; if (tep aode ! » null δδ tempjaode.nodeName !— 'fcomment' ) stratify(vpos,tempjaode) ; > } function display(flag) { var root-xmldoc.documentElement; if (flag—1){ show(root); } if (flag=2){ hide (root) ; ϊ > function hide(node) { node_name=node.nodeName; document.all (nodejαame) .style.display-"none"; if (node.hasChildNodes() ) { hide(node.childNodes(0) ) ; tempjαode=node.nextSibling; if (tempjaode !— null δδ tempjaode.nodeName I— 'fcomment' ) hide(tempjaode) ; ) function "show(node) { nodejaame-node.nodeName; document.all(nodejαame) .style.display-"block"; if (node.hasChildNodes ()){ show(node.childNodes(0) ) ; > temp_node-node.nextSibling; if (tempjaode !- null δδ tempjaode.nodeName !— •fcomment' ) show(tempjaode) ; > </script> </HEAD> <body background=backgrnd.gif> <center> <input name= » "showit" value-"Show All" type—"button" onclick—"display(l)">finbsp <input name-"hideit" value="Hide All" type-"button" onclick-"display(2)">&nbsp <input name—"view" value-"View" type—"button" language-javascript onclick-"window.open('viewjpatient.asp', 'right_frame' ) "> </center> <brxhr noshade width-80%xbr> <div id-"section"X/div> </BODY> </HTML> <% Microsoft ADO (c) 1996-1998 Microsoft Corporation. All Rights Reserved. ADO constants include file for VBScript ' CursorTypeEnum Values Const adOpenForwardOnly « 0 Const adOpenKeyset — 1 Const adOpenDynamic - 2 Const adOpenStatic - 3 » CursorOptionEnum Values -;— Const adHoldRecords - &H00000100 Const adMovePrevious - SH00000200 Const adAddNew - SH01000400 Const adDelete » &H01000800 Const adUpdate - &H01008000 Const adBookmark =» SH00002000 Const adApproxPosition = SH00004000 Const adUpdateBatch = δHOOOlOOOO Const adResync - &H00020000 Const adNotify = &H000 0000 Const adFind = &H00080000 t LockTypeEnum Values Const adLockReadOnly — 1 Const adLockPessimistiσ — 2 Const ' adLockOptimistic — 3 Const adLockBatchOptimistic - 4 ' ExecuteOptionEnum Values Const adRunAsync = SH00000010 Const adAsyncExecute - SH00000010 Const adAsyncFetch - &H00000020 Const adAsyncFetchNonBlocking — &H0O00004O Const adExecuteNoRecords - &H00000080 * ConnectOptionEnum Values Const adAsyncConnect = δHOOOOOOlO * ObjectStateEnum Values Const adStateClosed - SH00000000 Const adStateOpen - &H00000001 Const adStateConnecting — &H00000002 Const adStateExecuting - 5H00000004 Const adStateFetching - &H00000008 * CursorLocationEnum Values Const adDseServer = 2 Const adϋseClient = 3 ' DataTypeEnura Values Const adEmpty = 0 Const adTinylnt — 16 Const adSmalllnt - 2 Const adlnteger — 3 Const adBiglnt = 20 Const adUnsignedTinylnt — 17 Const adUnsignedSmalllnt — 18 Const adUnsignedlnt - 19 Const adUnsignedBiglnt — 21 Const adSingle — 4 Const adDouble — 5 Const adCurrency — 6 Const adDecimal - 14 Const adNumeric — 131 Const adBoolean - 11 Const adError - 10 Const adUserDefined - 132 Const adVariant - 12 Const adIDispatch = 9 Const adIUnknown - 13 Const adGUID - 72 Const adDate - 7 Const adDBDate - 133 Const adDBTime — 134 Const adDBTi eStamp = 135 Const adBSTR = 8 Const adChar = 129 Const adVarChar = 200 Const adLongVarChar = 201 Const adWChar - 130 Const adVarWChar - 202 Const adLongVarWChar — 203 Const adBinary = 128 Const adVarBinary - 204 Const adLongVarBinary — 205 Const adChapter — 136 Const adFileTime = 64 ^ Const adDBFileTime - 137 Const adPropVarlant — 138 Const adVarNu eric = 139 * FieldAttributeEnum Values Const adFldMayDefer = SH00000002 Const adFldOpdatable - SH00000004 Const adFldUnknownUpdatable - δH00000008 Const adFldFixed - δHOOOOOOlO Const adFldlsNullable - &H00000020 Const adFldMayBeNull - &H00000040 Const adFldLong - SH00000080 Const adFldRowID - δHOOOOOlOO Const adFldRowVersion - SH00000200 Const adFldCacheDeferred - δHOOOOlOOO Const adFldKeyColumn = SH0000800O • EditModeEnum Values Const adEditNone - SH0000 Const adEditlnProgress - δHOOOl Const adEditAdd - &H0002 - Const adEditDelete - SH0004 * RecordStatusEnum Values Const adRecOK = δHOOOOOOO Const adRecNew - SH0000001 Const adRecModified - SB0000002 Const adRecDeleted - &H0000004 Const adRecUnmodified - 6H0000008 Const adRecInvalid - &H0000010 Const adRecMultipleChanges - fiH0000040 Const adRecPendingChanges - 6H0000080 Const adRecCanceled - δHOOOOlOO Const adRecCantRelease - 6H0000400 Const adRecConcurrencyVlolation — &H0000800 Const adRecIntegrityViolation — &H0001000 Const adRecMaxChangesExceeded - &HQ002000 Const adRecObjectOpen - &H0004000 Const adRecOutOfMemory - &H0008000 Const adRecPermissionDenied - SH0010000 Const adRecSchemaViolation - &H0020000 Const adRecDBDeleted - 5H0040000 ' GetRowsOptionEnum Values Const adGetRowsRest = -1 ' PositionEnum Values ■ Const adPosϋnknown = -1 Const adPosBOF = -2 Const adPosEOF = -3 • enum Values Const adBookmarkCurrent — 0 Const adBookmarkFirst — 1 Const adBookmarkLast — 2 • MarshalOptionsEnum Values Const adMarshalAll — 0 Const adMarshalModifiedOnly - 1 i AffectEnum Values Const adAffectCurrent = 1 Const adftffectGroup — 2 Const adAffectAll = 3 Const adAffectAllChapters - 4 * ResyncEnum Values Const adResyncUhderlyingValues — 1 Const adResyncAllValue3 — 2 * CompareEnum Values Const adCompareLessThan — 0 Const adCompareEqual — 1 Const adCompareGreaterThan — 2 Const adCompareNotEqual — 3 Const adCompareNotComparable — 4 * FilterGroupEnum Values Const adFilterNone = 0 Const adFilterPendingRecords — 1 Const adFilterAffectedRecords - 2 Const adFilterFetchedRecords - 3 Const adFilterPredicate » 4 Const adFilterConflictingRecords - 5 * SearchDirectionEnum Values —— Const adSearchForward — 1 Const adSearchBackward — -1 ' PersistFoπnatEnum Values ——- Const adPersistADTG - 0 Const adPersistXML - 1 Const adPersistHTML - 2 ' StringFormatEnum Values Const adStringXML - 0 Const adStringBTML — 1 Const adClipString - 2 ' ADCPROPJDPDATECRITERIAJENUM Values Const adCriteriaKey =» 0 Const adCriteriaAllCols — 1 Const adCriteriaUpdCols = 2 Const adCriteriaTimeStamp - 3 ' ADCPROP ASYNCTHREADPRIORITYJBNUM Values Const adPriorityLowest = 1 Const adPriorityBelowNormal- — 2 Const adPriorityNormal = 3 Const adPriorityAboveNormal — 4 Const adPriorityHighest = 5 * ConnectPro ptEnum Values Const adPromptAlways — 1^ Const adPromptComplete — 2 Const adPro ptCompleteRequired — 3 Const adPro ptNever — 4 * ConnectModeEnum Values Const adMbdeUnknown — 0 Const adModeRead — 1 Const adModeWrite - 2 Const adModeReadWrite — 3 Const adModeShareDenyRead — 4 Const adModeShareDenyWrite — 8 Const adModeShareExclusive - δHc Const adModeShareDenyNone — δHIO ' IsolationLevelEnum Values Const adXactUnspecified = δHffffffff Const adXactChaos - δHOOOOOOlO Const adXactReadUncommitted - δHOOOOOlOO Const adXactBrowse - &H00000100 Const adXactCursorStability - δHOOOOlOOO Const adXactReadCommitted - δHOOOOlOOO Const adXactRepeatableRead - SB00010000 Const adXactSerializable - 5H00100000 Const adXactlsolated - δHOOlOOOOO * XactAttributeEnum Values Const adXactCommitRetaining - &H00020000 Const adXactAbortRetaining - SB00040000 * PropertyAttributesEnum Values —~ Const adPropNotSupported — &H0000 Const adPropRequired - fiHOOOl Const adPropOptional - SH0002 Const adPropRead - &H0200 Const adPropWrite - δH0400 * ErrorValueEnum Values Const adErrlnvalidArgument - &Hbb9 Const adErrNoCurrentRecord - δHbcd Const adErrlllegalOperation - 6Hc93 Const adErrlnTransaction - δHcae Const adErrFeatureNotAvailable — fiHcb3 Const adErrltemNotFound - δHccl Const adErrObjectlnCollection - 6Hd27 Const adErrObjectNotSet = δRd5c Const adErrDataConversion = SHd5d Const adErrObjectClosed - 6He78 Const adErrObjectOpen - δHe79 Const adErrProviderNotFound - δHe7a Const adErrBoundToCommand — SHe7b Const adErrlnvalidParamlnfo = δBe7c Const adErrlnvalidConnection — δHe7d Const adErrNotReentrant — &He7e Const adErrStillExecuting = SHe7f Const adErrOperationCancelled = SHeδO Const adErrStillConnecting - SHeδl Const adErrNotExecuting — SHe83 Const adErrUnsafeOperation — &He84 * ParameterAttributesEnum Values Const adParamSigned - SH0010 Const adParamNullable - SH0040 Const adParamLong = 6H0080 * ParameterDirectionEnum Values Const adPara Unknown — δHOOOO Const adParamlnput - fiHOOOl Const adParamOutput - SH0002 Const adParamlnputOutput — SH0003 Const adParamReturnValue - SH0004 ' CommandTypeEnum Values Const adCmdOnknown - &H0008 Const adCmdText = δHOOOl Const adCmdTable - &H0002 Const adCmdStoredProc - &H0004 Const adCmdFile - &H0100 Const adCmdTableDirect - 6H0200 • EventStatusEnum Values Const adStatusOK — δHOOOOOOl Const adStatusErrorsOccurred — δH0000002 Const adStatusCantDeny » 6H0000003 Const adStatusCancel - SH0000004 Const adStatusUnwantedEvent - &H0000005 t _.— EventReasonEnum Values Const adRsnAddNew — 1 Const adRsnDelete - 2 Const adRsnOpdate - 3 Const adRsnUndoUpdate — 4 Const adRsnOndoAddNew — 5 Const adRsnUndoDelete - 6 Const adRsnRequery - 7 Const adRsnResynch - 8 Const adRsnClose — 9 Const adRsnMove — 10 Const adRsnFirstCbange — 11 Const adRsnMoveFirst — 12 Const adRsnMoveNext — 13 Const adRsnMovePrevious — 14 Const adRsnMoveLast - 15 * SchemaEnum Values Const adSchemaProviderSpecific = -1 Const adSchemaAsserts — 0 Const adSchemaCatalogs — 1 Const adSchemaCharacterSets = 2 Const adSchemaCollations — 3 Const adSchemaColumns — 4 Const adSchemaCheckConstraints — 5 Const adSchemaConstraintColumnUsage — 6 Const adSchemaConstraintTableUsage — 7 Const adSchemaKeyColumnUsage — 8 Const adSchemaReferentialContraints — 9 Const adSchemaTableConstraints — 10 Const adSchemaColumnsDomainUsage — 11 Const adSchemalndexes — 12 Const adSchemaColumnPrivileges — 13 Const adSchemaTablePrivileges — 14 Const adSchemaUsagePrivileges — 15 Const adSchemaProcedures — 16 Const adSchemaSchemata — 17 Const adSchemaSQLLanguages - 18 Const adSchemaStatistics •* 19 Const adSchemaTables — 20 Const adSchemaTranslations — 21- Const adSchemaProviderTypes — 22 Const adSchemaViews » 23 Const adSchemaViewColumnUsage — 24 Const adSchemaViewTableUsage - 25 Const adSchemaProcedureParameters — 26 Const adSchemaForeignKeys — 27 Const adSchemaPrimaryKeys - 28 Const adSchemaProcedureColumns — 29 Const adSchemaDBInfoKeywords — 30 Const adSchemaDBInfoLiterals — 31 Const adSchemaCubes - 32 Const adSchemaDimensions — 33 Const adSchemaHierarchies — 34 Const adSchemaLevels — 35 Const adSchemaMeasures — 36 Const adSchemaProperties - 37 Const adSchemaMembers — 38 »- SeekEnu Values —— Const adSeekFirstEQ - δHl Const adSeekLastEQ - fiH2 Const adSeekGE — SH4 Const adSeekGT - fiH8 Const adSeekLE - 6H10 Const adSeekLT - δH20 %>

Claims: What is claimed is: 1. A method of distributing health information, comprising the steps of: A. generating health data representative of at least one set of health information for an individual; B. generating access priority data representative of an access priority associated with each of said at least one set of health information, said access priority being based on criteria for release authorization established by said individual; C. storing at a datastore said health data and associated access priority data; D. receiving from a requestor, by way of a communications network, a request for at least one of said sets of health information, said request including access data correlated to an access priority; E. processing said access data to determine whether said access data corresponds to said access priority criteria for said requested health information; and i. when said access data corresponds to said access criteria for said requested health information, transmitting said requested health information to said requestor by way of said communications network, and ii. when said access data fails to correspond to said access criteria, denying access to said requestor to said health information. 2. The method according to claim 1, wherein said communications network is the Internet. 3. The method according to claim 1, wherein said transmitted health information is encrypted. 4. The method of distributing medical according to claim 2 further comprising the step of designating certain of said access priority data as identification constraints which must be received in step D before access to said medical information is granted. 5. A method of distributing medical information for an individual over a communications network comprising the steps of: A. generating a plurality of security access codes; B. generating a plurality of hierarchical categories, ranging from a low security category to a high security category; C. categorizing the individual's medical information into privacy levels ranging from a least private level to a most private level; D, inputting the individual's categorized medical information into said plurality of hierarchical categories, said least private level being input into said low security category and said most private level being input into said high security category; E. assigning, to each of said categories, one or more of said access security codes, such that said medical information in each category will be released only if the assigned access security codes are received; F. receiving, from a requestor, one or more of said access security codes over said communications network; G. determining whether said received access security codes match one or more of said assigned access security codes; and H. transmitting, to said requestor over said communications network, said medical information in said categories in which said received security access codes match said assigned security access codes. 6. The method of distributing medical information for an individual over a network according to claim 5, wherein said communications network is the internet. 7. The method of distributing medical information for an individual over a network according to claim 6, wherein said released medical information is encrypted. 8. The method of distributing medical information for an individual over a network according to claim 6 further comprising the step of designating certain of said security access codes as identification constraints which must be received in step F before access to said medical information is granted. 9. The method of distributing medical information for an individual over a network according to claim 6 wherein, prior to step F, identification information is received from the requestor, said identification information being for identifying the individual. 10. The method of distributing medical information for an individual over a network according to claim 9 wherein said identification information is selected from the group consisting of the individual's medical record numbers, demographic data, information from a smart card that identifies the patient, retinal scans, iris scans and fingerprints. 11. The method of distributing medical information for an individual over a network according to claim 9 wherein said identification information is any information about the individual which is available to said requester. 12. A system for distributing medical information for an individual over a communications network comprising: a server system including a computer processor and associated memory, said server system having database of a plurality of hierarchical categories for the individual, said categories ranging from a low security category to a high security category, each of said categories having medical information of said individual contained therein, said medical information ranging from least private information to most private information, said least private medical information being contained in said low security category and said most private medical information being contained in said high security category, each of said categories having one or more security access codes assigned thereto; a request system including a computer processor and associated memory, said requestor system inputting one or more of said security access codes to said server system over said communications network; and an access determining device for transmitting, to said requestor system, the medical information in each of said categories in which said input security access codes match said assigned security access codes. 13. The system according to claim 12 wherein said communications network is the internet. 14. The system according to claim 13, further including a setup system, including a computer processor and associated memory, for inputting said medical information to said database. 15. The system according to claim 14 wherein said security access codes are defined by a user and are assigned to said categories by said user through said setup system. 16. The system according to claim 13 wherein more of said security access codes are required to access said high security categories than said low security categories. 17. The system according to claim 13 wherein said setup system and said requestor system are the same system. 18. The system of claim 13 wherein said request system is coupleable to said network by a wired connection. 19. The system of claim 18 wherein said request system is selected from the group consisting of a personal computer, an interactive television system, a personal digital assistant and a cellular telephone. 20. The system of claim 13 wherein said request system is coupleable to said network by a wireless connection. 21. The system of claim 20 wherein said request system is selected from the group consisting of a personal computer, an interactive television system, a personal digital assistant and a cellular telephone. 22. The system of claim 14 wherein said setup system is coupleable to said network by a wired connection. 23. The system of claim 22 wherein said setup system is selected from the group consisting of a personal computer, an interactive television system, a personal digital assistant and a cellular telephone. 24. The system of claim 14 wherein said setup system is coupleable to said network by a wireless connection. 25. The system of claim 24 wherein said setup system is selected from the group consisting of a personal computer, an interactive television system, a personal digital assistant and a cellular telephone.

Inventors: SCHOENBERG ROY, SCHOENBERG, ROY
Applicants: CAREKEY COM INC, CAREKEY.COM, INC.
Application year: 2001
Main classification: G06F17
IPC codes: G06F17, G06F19, G06Q10, G06Q50