Getting Started Guide
07/28/2000
Freemed-YiRC Beta0.13
---------------------

NOTE:  This document was current for Beta0.02.  Some of the features (such
       as the placement of the Incident Report Database) may be listed wrong
       in this document because they've since been moved).  However, this
       guide is still a VERY good source of information on how the user/secdb/
       groupdb/contact databases interact and relate.

NOTE:  Please make sure you've followed the instructions in the INSTALL file
       and that Freemed-YiRC works (up to the login screen, at lease) before
       moving ahead!!!

LET'S GO!

The first thing you need to do is to log in to Freemed-YiRC.  When you ran the
makedb scripts, a root user was created.  This is currently the only user in
the system.  You can make more once you get in, but we'll get to that later.

Log in using the USERNAME 'root' and PASSWORD '123'.  Click on the 'Login'
button.

You should see a screen flash which says 'Authenticated!'.  However, if you
see a screen that says 'INVALID LOGIN', then you either typed in the username
or password wrong, or there was an error while creating the tables using the
provided scripts.  If you can't seem to log in, try re-installing following
the instructions in the INSTALL file very closely.

If all goes well, you should be at 'ROOT'S MENU'.  You see the following
options:

	Create User
	Security Database
	Group Database
	Contact Database

Create User:  Should be rather self-explanatory :).  It basically just creates
a Freemed-YiRC user.  Note that Freemed-YiRC doesn't use Linux login names and
passwords.  The login names and passwords (encrypted using MD5) are stored in
a table.

Security Database:  This is one of the major features of Freemed-YiRC.  No one
can do anything in Freemed-YiRC unless given permission.  This is important due
to the sheer number of different job duties given to Residential Care staff.

Group Database:  This may need a little explaining before moving on.  A 'Group'
is one of two things.  It's either a physical facility (i.e. a Group Home) or
it can be a group used for accounting purposes.  Users can belong to multiple
groups.  For instance, if they work in two different facilities, but are also
a member of the treatment team, then they could belong to three different
groups.  The Group Database containts information about each group.

Contact Database:  This concept may also need some explaining.  Everyone in
Freemed-YiRC, including all staff, residents, and contacts are referred to as
'Contacts'.  Usually there are separate databases (tables) for Staff, Residents,
and Contacts.  The advantages to having one system will become more apparent
as time progresses.  In the Contact Database, information about Staff, 
Residents, and Contacts is stored in the same place, making it all easy to get
to.

MAKE ANY SENSE?  I hope so! :)

OK.  What you see is the basic foundation upon which Freemed-YiRC will grow.
So what can you do with Freemed-YiRC?  I thought Beta0.02 had an Incident
Report System???  It does.  The reason you can't see it on ROOT'S MENU is
simple.  ROOT doesn't have permission to read or write Incident Reports.  
A real person should be doing that, not the System Administrator. 

WHAT NOW?

What we're going to do walk you through the process of creating information 
about one facility (i.e. a group), then we'll enter info about Staff and
Resident entries in the Contact Database, create a user, give that user 
proper security permissions, and finally: log in as that user and write an
incident report.

CREATING A GROUP IN THE GROUP DATABASE:

Click on 'Group Database'.

What you see here is a blank table.  Not very informative.  When we're done
adding the first group, it will make more sense.  Go ahead and click on
'Add Group'.  You should see a form which reads: 'Add Group to Group Database'.

What we're going to do is create a physical group home entry.  Let's call it
the 'Bob Johnson Memorial Group Home'.  Staff usually refer to it as the 
'Johnson' Group Home, and it's also referred to by it's 2 Letter Abbreviation
of 'BJ'.  OK?

So let's enter this information.  The first field is the '2-Letter Abbr.' field.
Enter 'BJ' in this field.  Now this is a physical group home, so in the 'Type'
field, make sure 'Home' is chosen.  Since it's usually referred to as the 
'Johnson' Group Home, enter 'Johnson' in the 'Short Name' field.  Next,
enter it's full name, 'Bob Johnson Memorial Group Home' in the 'Long Name'
field.  

The next two fields are for accounting information.  Your agency/company may
or may not use this information.  The 'Acct. Num Code' field is associated
with a 'Cost Center'.  In your agency/company, each group home (as well as
the headquarters building) each have a cost center.  In our scenario let's
say that we only have one facility and that the headquarters is built into it.
So our 'Cost Center' is 100.  Go ahead and enter '100' in the 'Acct. Num Code'
field.  The 'Acct. Char Code' field is the taxing district this facility 
resides in.  Again, your agency/company may or may not use this information.
Let's sat that the BJGH residents in the Los Angeles, CA area.  So let's give
it a tax district of 'LA'.  Go ahead and enter 'LA' in the 'Acct. Char Code'
field.

The next few fields relate to the physical address and phone number of this
facility.  This information isn't necessary for the purposes of our 
demonstration, and is rather self-explanatory.  NOTE:  You may see data
entered in the 'State' and 'Phone' fields.  This info can be changed by means
of modifying one of the PHP files.  For now, don't worry about it.

Let's finish up by hitting the 'Enter' button at the bottom.  A screen will
flash quickly indicating that the data was entered into the SQL database. OK!

Now you should see the Group Database again, this time with more data.  And
look... there's our group home!  On the right side you should see two links
labeled 'Modify' and 'Delete'.  These should be rather self-explanatory.  The
'Modify' link enables you to edit information about this group, and the 'Delete'
link enables you to delete it from the database all together.  USE EXTREME
CAUTION WHEN DELETING ANY RECORDS, ESPECIALLY GROUP RECORDS.  DOING SO MAY CAUSE
CORRUPTION OF THE DATA AND BROKEN LINKS.  OK?

Let's move on.  You can exit the Group Database by clicking on the 'BACK' 
link at the bottom, or hitting the grey button that looks like a side-ways
envelope on the title bar (to the extreme right of 'Freemed-YiRC').  Either
will take you back to the main menu.

CREATING STAFF AND RESIDENTS IN THE CONTACT DATABASE:

Click on 'Contact Database'.

What you (SHOULD) see now is the basic Contact Database view.  It should have
one Contact listed: root.  On this view is the information and links necessary
to find out everything (that Freemed-YiRC) knows about this person.  The
first field is the 'Contact Type'.  This can either be 'Staff', 'Resident',
or 'Standard'.  Obviously, the System Administrator (root) is a staff member.
The next four fields deal with this Contact's name.  A nice feature of 
Freemed-YiRC is the use of nicknames.  In other words, a persons real full name
is stored for use in formal settings (i.e. accounting functions (to be added)),
but in general use, the staff is called what he/she wants to be called.  The
nickname for the System Adminstrator is 'root'.  The first name is 'System',
and the last is 'Administrator'.  No Middle Name... that's quite alright.  Not
everyone has a middle name :).  OK... the fields under the heading 'Contact
Information' contain links to just that:  all the info you need to know about
this contact.  Right now this is limited, but it will be growing fast.  Please
consult the DATA MODEL diagrams for illustrations of this.  The links in these
fields will take you to different tables.  For instance, the link labeled
'Groups' will take show you all the 'groups' associated with this contact.
The 'Description' link will give you a short description of this contact.  
The 'Addresses','Numbers', and 'E-Mail' links will show you all the different
ways of getting a hold of this Contact.  Some of this may be used for 
accounting purposes later on.  It's best to at least have one address and
phone number of each contact.  However, it's all optional.  The last field
in the 'Contact Information' section relates to notes about this Contact.
There are two types, 'Notes' and 'Admin Notes'.  Since root is a top-level
administrator, he/she get's full access, including Administrative Notes about
this contact.  Normal users may only see the 'Notes' link or may see neither,
depending on their security clearance.  What are notes for?  Normal notes
may be used for almost anything, including just keeping tabs on contacts,
or entering information that can't be placed anywhere else.  'Admin Notes'
on the other hand are seen/entered only by a top-level administrator.  These
notes may include evaluations and other confidential admin data.  Finally,
the last field contains the links 'Modify' and 'Delete'.  These serve the
same functions as those in the Group Database.  As always: EXCERSIZE EXTREME
CAUTION WHEN USING THESE LINKS!

OK.  We need to create two contacts.  A fictional staff and resident for use
with this demonstration.  Go ahead and click on 'Add Contact'.  You should
see a form labeled 'Add Contact to the Contact Database'.  Make sense?  :)
The first field is the 'Type' field.  Since we're entering a staff, let's
make this say 'Staff'.  The next four fields deal with this persons name.
Let's say our staff's name is 'Joebob Billy Sponge'.  But his friends call
him 'Frank' :).  Enter 'Joebob' into the 'First Name' field.  Enter 'Billy'
into the 'Middle Name' field.  Enter 'Sponge' into the 'Last Name' field.
Enter 'Frank' into the 'Nick Name' field.  Lastly, we have a description
for this user.  Let's just say that 'Frank is a coordinator'.  Go ahead and
put 'Frank is a coordinator' into the description field.

Click on the 'Enter' button.  A screen should flash really quick indicating
the data has been entered.  Then you should be returned to the Contact Database
screen.  Look... now we've got two contacts!  The last thing we need to
do for Frank is to assign him to the Johnson Group Home.  So click on the
link that says 'Groups' on Franks record.  

A screen should come up that says 'Contact Database, Groups for Frank Sponge'.
See, although users proper names are stored, the system will call them by
their nickname.  In any case, there are two fields:  'Group' and 'Primary?'.
Right now there are no groups associated with Frank.   So let's do it!  
Click on the 'Add Group' link.  This will bring up the 'Add Group for
Frank Sponge' screen.  In the 'Group' line, 'BJ' should pop up for us!  Since
we have only one Group defined, it's the only one on the list.  The next
line says 'Primary?'.  What this line is for is into indicate the main group
this person belongs to for timecard/accounting/reporting purposes.  Since
we have only one group, let's make sure 'Primary?' says 'Yes'.  OK?  Click
on the 'Enter' button.  

You should be returned to the previous screen, and one record should appear!
Note the 'Delete' link next to it.  As always, EXCERSIZE EXTREME CAUTION USING
'DELETE' LINKS!  OK.  We're done.  Click on the link labeled 'BACK'.

OK.  We've added our new staff member, Frank.  Next we need to enter a 
resident.  Let'd add 'Shelly', our favorite 13 year old snot nose brat.

Go ahead and click on 'Add Contact'.  Select the 'Type' to be 'Resident'.
Enter 'Michelle' in the 'First Name' field.  Shelly has no middle name,
so go ahead and skip that field.  Enter 'Smith' in the 'Last Name' field. 
Enter 'Shelly' in the 'Nick Name' field.  Let's not enter a description.
Entering in '13 year old snot nose brat' may get us into trouble :).  Click
on the 'Enter' button.  Finally, click on 'Groups' on Shelly's record.
Click on 'Add Group' and enter 'BJ' as the 'Group'.  It is her Primary
Group, so say 'Yes' to 'Primary?'  Click on the 'Enter' button.  Now Shelly
is a resident of the Johnson Group Home (BJGH).  Click on the 'Back' link
to bring you back to the main Contact Database screen.  OK?

Now we've got a sysadmin, root.  We've got a staff, Frank Sponge.  And we've
got a resident, little Shelly Smith.  What's next?  Well, we need to give
Frank access to the system so he can write Incident Reports on little Shelly.

Click on the 'BACK' button.  This should bring you to the main menu.  The first thing we need to do is create a login name for Frank.  So click on 'Create
User'.  Look!  Franks already there.  What this does is select all the 
'Staff' from the Contact Database who don't already have login names.  This
way you don't have to 'hunt-and-click' through the list of contacts to give
a user access.  NOTE:  The user MUST have a 'Staff' entry in the Contact
Database to be assigned a login name!!!  OK.  'Frank Sponge' should already
be assigned in the 'Contact' filed.  Let's give him an easy login user ID.
'frank' will do.  Enter 'frank' in the 'Username' field.  Lower case, please.
Now Frank needs a password.  Let's keep it simple (for the purpose of our
demonstration).  Let's put '123' in the 'Password' field.  You have to do
it again in the second 'Password' field.  WHY???  So that way if you screw
something up, you won't be denied access later and have to do all this again!
After you've entered the password in BOTH of the password fields, click on
'Create User'.  You should see a screen stating 'User frank Created!'.  
OK!  Go ahead an click on 'BACK'.

Now what???  Well, we've got Frank the Contact, and Frank the user.  The final
thing we need to do is tell Freemed-YiRC what Frank can and cannot do.  This
is done in the 'Security Database'.  Go ahead and click on 'Security Database'.

Welcome to the Security Database.  You should see 'root' here with X's in almost
all fields except for the last two.

	Loginid: The users login (user) name
	Topadmin: The Top-Level administrator priveledge
	Makeuser: The ability to create more users
	Secdb: The ability to view the Security Database
	Secdb_edit: The ability to EDIT/ADD to the Security Database
	Groupdb: The ability to view the Group Database
	Groupdb_edit: The ability to EDIT/ADD to the Group Database
	Con: The ability to view the Contact Database
	Con_edit: The ability to EDIT/ADD to the Contact Databae	
	Ir: The ability to view the Incident Report Database
	Ir_edit: The ability to EDIT/ADD to the Incident Report Database

How come 'root' doesn't have access to the Incident Report Database?  As I
explained eariler, 'root' is the System Administrator, and Incident Reports
should be a function of a staff.

OK.  Click on 'Add Entry'.  Notice that 'Frank' appears for you!  Again,
this list selects only users without security records.  The system should
be very tight, and should not allow the creation of users that don't really
exist :).  

OK.  Now I like Frank and all, but he's not the greatest with computers,
and he frequently screws things up on the kid's PC used for educational games.
So we're only going to give him access to the Incident Report DBs.  Go 
ahead and select the last two, 'View Incident Report DB' and 'Edit Incident
Report DB'.  Then click on the 'Enter' button.

Frank should now appear with X's in the 'Ir' and 'Ir_edit' fields.  

Frank is now ready to enter the world of Freemed-YiRC!

WHAT NOW?  First, we need to log out of root's session.  To do this, click
on the 'X' in the upper right hand corner of the Freemed-YiRC window (the
X right next to the picture of the sideways envelope to the extreme right of
'Freemed-YiRC on the blue bar).  This will log you out, and place you back
at the main Freemed-YiRC login screen.

LOGGING IN AS A USER

OK.  Let's pretend we're Frank Sponge and log in.  Enter 'frank' in the
'USERNAME' field (lowercase, please) and enter '123' in the 'PASSWORD' field.

A breif screen should say 'AUTHENTICATED'.  If not, you entered the name or
password wrong.  Please try again. 

You should be placed at a screen called 'FRANK'S MENU'.  Notice that it's not
very big!  This is a 'generated' menu.  This means that only the items you've
got security to do are placed on your menu.  This system is very clean because
it means that no person has to manually edit user menus.  There should be
only one option on Frank's menu:  Incident Report System.

WRITING/VIEWING INCIDENT REPORTS

As the Incident Reports System in Beta 0.02 is considered very Beta, I'm not
going to do a walk through.  How you move around it is very much the same as
the rest of the Freemed-YiRC system (what little there currently is :) ).
So go ahead and play with it!  At this time you can write and delete IRs...
the Modify function wasn't done in time for the release.
