Available serverside.
Available clientside.
The praxisd class connects and handles communication with the praxisd daemon process.
object Praxisd.new(string host, int port)
Create a new Praxisd connection object.
px = Praxisd.new('localhost', 10000)
host
The hostname to connect to.
port
The port number to connect to.
Returns The newly created communication object.
stringlist-list praxisd:cavelist()
px = Praxisd.new('localhost', 10000)
lst = px:cavelist()
for i=0,#lst do
print('cave: ' .. lst[i][1])
print('bemaerkning1: ' .. lst[i][2])
print('bemaerkning2: ' .. lst[i][3])
print('bemaerkning3: ' .. lst[i][4])
end
Returns The complete list of known (possible) cave from the server.
The returned stringlist are indexed as follows: 1: cave - 2: bemaerkning1 -
3: bemaerkning2 - 4: bemaerkning3
stringlist-list praxisd:behandlinglist()
px = Praxisd.new('localhost', 10000)
lst = px:behandlinglist()
for i=0,#lst do
print('kode: ' .. lst[i][1])
print('behandling: ' .. lst[i][2])
print('bemaerkning: ' .. lst[i][3])
print('udregning: ' .. lst[i][4])
end
Returns The complete list of known (possible) behandling from the server.
The returned stringlist are indexed as follows: 1: kode - 2: behandling -
3: bemaerkning - 4: udregning.
stringlist-list praxisd:diagnoselist()
px = Praxisd.new('localhost', 10000)
lst = px:diagnoselist()
for i=0,#lst do
print('kode: ' .. lst[i][1])
print('diagnose: ' .. lst[i][2])
print('bemaerkning: ' .. lst[i][3])
end
Returns The complete list of known (possible) diagnose from the server.
The returned stringlist are indexed as follows: 1: kode - 2: diagnose -
3: bemaerkning.
stringlist-list praxisd:getcave(string patientid)
px = Praxisd.new('localhost', 10000)
lst = px:getcave('1234567890')
for i=0,#lst do
print('cave: ' .. lst[i][1])
print('bemaerkning1: ' .. lst[i][2])
print('bemaerkning2: ' .. lst[i][3])
print('bemaerkning3: ' .. lst[i][4])
print('sogetxt: ' .. lst[i][5])
print('sogedato: ' .. lst[i][6])
end
patientid
A string containing the patientid.
Returns The list cave registered with the patient.
The returned stringlist are indexed as follows: 1: cave - 2: bemaerkning1 -
3: bemaerkning2 - 4: bemaerkning3 - 5: sogetxt - 6: sogedato.
stringlist-list praxisd:getbehandling(string patientid)
px = Praxisd.new('localhost', 10000)
lst = px:getbehandling('1234567890')
for i=0,#lst do
print('kode: ' .. lst[i][1])
print('behandling: ' .. lst[i][2])
print('bemaerkning: ' .. lst[i][3])
print('udregning: ' .. lst[i][4])
print('sogetxt: ' .. lst[i][5])
print('sogedato: ' .. lst[i][6])
end
patientid
A string containing the patientid.
Returns The list behandling registered with the patient.
The returned stringlist are indexed as follows: 1: kode - 2: behandling -
3: bemaerkning - 4: udregning - 5: sogetxt - 6: sogedato.
stringlist-list praxisd:getdiagnose(string patientid)
px = Praxisd.new('localhost', 10000)
lst = px:getdiagnose('1234567890')
for i=0,#lst do
print('kode: ' .. lst[i][1])
print('diagnose: ' .. lst[i][2])
print('bemaerkning: ' .. lst[i][3])
print('sogetxt: ' .. lst[i][4])
print('sogedato: ' .. lst[i][5])
end
patientid
A string containing the patientid.
Returns The list diagnose registered with the patient.
The returned stringlist are indexed as follows: 1: kode - 2: diagnose -
3: bemaerkning - 4: sogetxt - 5: sogedato.
nil praxisd:addcave(string patientid, string cave, string text)
Add a cave entry to a patient. To retrieve list of cave from a patient see
praxisd:getcave(). NOTE: This function is only available on the server.
px = Praxisd.new('localhost', 10000)
px:addcave('1234567890', 'AZOPT', '')
patientid
A string containing the patientid.
diagnose
The cave string.
text
A text to store with the cave entry. NOTE: This is not shown in
PCPraxis! The string mat be up to 6 characters long. If longer it will be
trunkated.
nil praxisd:addbehandling(string patientid, string behandling, string text)
Add a behandling to a patient. To retrieve list of behandling from a patient see
praxisd:getbehandling(). NOTE: This function is only available on the server.
px = Praxisd.new('localhost', 10000)
px:addbehandling('1234567890', 'B0001', 'o.sin')
patientid
A string containing the patientid.
diagnose
The behandling code.
text
A text to store with the behandling code. The string mat be up to 6
characters long. If longer it will be trunkated.
nil praxisd:adddiagnose(string patientid, string diagnose, string text)
Add a diagnose to a patient. To retrieve list of diagnose from a patient see
praxisd:getdiagnose(). NOTE: This function is only available on the server.
px = Praxisd.new('localhost', 10000)
px:adddiagnose('1234567890', 'C0001', 'o.dxt')
patientid
A string containing the patientid.
diagnose
The diagnose code.
text
A text to store with the diagnose code. The string mat be up to 6
characters long. If longer it will be trunkated.
nil __gc()
Garbage collector. Closes connection and frees all allocated memory.