On Fri, Jul 17, 2009 at 12:10:17AM -0700, Jim Busser wrote:
Jim wrote a nice explanation. A few comments below:
> Before we go into pgAdmin III we need to know some information about
> what we will put in the UPDATE command:
UPDATE is the correct approach
> From the wiki page, click V11.
For the database for the to-be-0.5 client, that is.
> At this point, it helps to be familiar
> that the gnumed schema is divided into subschemas like "audit", "clin",
> "dem" ... the table that we want is within "dem"... it is the "identity"
dem. being demographics
> 3) pgAdmin III will need Karsten or Sebastian's help (?)
>
> From the Gnome desktop menu Applications > System Tools > pgAdmin III
pgAdmin III can be started from the menu Help / Debugging in
GNUmed.
> - it appears we need to create a "connection" to "register our server" in
> pgAdmin III
> --> below the File menu, click the "AC plug" icon
>
> - complete the "new server registration"
> - name can be anything you want (?)
yes, say "any-doc-v11-local"
> - host is presumably your laptop as localhost (?)
leave it empty
database: gnumed_v11
user: any-doc (or your account name)
pw: any-doc (or your account name)
Do not make it save the password.
> $ sudo su - postgres
> $ psql -U postgres
> # alter role postgres with password '123';
> # \q
> $ exit
This will not help because due to pg_hba.conf postgres
cannot use a password locally (on Debian anyway).
> - click "OK"
> - thereafter we should be able to see something in the left pane that
> can be popped open and selected... I am expecting somewhere we might be
> able to see gnumed_v11... if so, maybe just click on it?
within the 1st level nodes the name any-doc-v11-local will appear.
> - can a suitable UPDATE command now just be pasted into the bottom right
> "SQL pane"?
no
expand down to the "gnumed_v11", activating that node
the upper right will display statistics
open the query tool "page with SQL on it with pen"
type at the upper left
bury Kirk:
update dem.identity set deceased = now() where pk = 12;
observe how Kirk has donned his asbestos suit (the
query fails)
this is one level of protection in GNUmed - database
connections are read only until they are made writable
try again:
begin;
set transaction_read_only to off;
update dem.identity set deceased = now() where pk = 12
rollback;
no error should occur
replace the now() by a timestamp
replace the 12 by the patient's PK
if you are satisfied, replace the "rollback;" by "commit;"
For the timestamp use
'YYYY-MM-DD HH:MM'::timestamp with time zone
a time zone is not required, it will assume your local time zone
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
_______________________________________________
Gnumed-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/gnumed-devel