Updated Answer
Based on what I have gathered so far, this is about as far as I can get you at the moment. It is pretty well commented so you can see what it is doing. Add an example and I can probably get you further along...
#!/bin/bash
#
# Go to the Desktop, or wherever the CSV file is and the output tree must be made
cd ~/Desktop || exit
# Parse "data.csv" using "|" as field separator
awk -F'|' '
{
# Pick up all fields of record into appropriately named variables
CCDOC=$1; FamID=$2; PtID=$3; DocType=$4; Date=$5; Ext=$6;
# Output name of directory to create, surrounded by "" to permit spaces, e.g. "Lab Test"
print "\"ROOT/" FamID "/" PtID "/" DocType "/" Date "\""
}' data.csv | xargs mkdir -p
Given a data.csv file like this:
CCDOC|F999|P5678|Consult|02-03-2013|PDF
CCDOC|F7777|P1111|Radiology|03-04-1999|JPG
CCDOC|F999|P4321|Lab Test|06-12-1997|PDF
you will get this:

Original Answer
At its heart, the answer to your question is to use the mkdir -p command in the shell that makes a directory, INCLUDING ANY NECESSARY INTERVENING DIRECTORIES, without complaining if anything already exists, or doesn't exist, along the way. Try it for yourself by pasting this into the Terminal
mkdir -p ~/Desktop/Freddy/Frog/on/a/log
and you will get this on your Desktop

Now, the question is whether to go parsing that Filemaker Pro CSV file using Applescript or not. Personally, I find Applescript so unbelievably verbose as to be unintelligible, and would go with straight bash every day of the week... and don't forget you can harness all that bash power from Applescript simply by using
do shell script xyz
Just to give a little example, say you saved the following as a sample file on your Desktop and called it data.csv. Note there are two patients (P5678 and P4321) in family F999.
CCDOC|F999|P5678|Consult|02-03-2013|PDF
CCDOC|F7777|P1111|Radiology|03-04-1999|JPG
CCDOC|F999|P4321|Lab|06-12-1997|PDF
You could then paste the following one-liner into your Terminal
cd ~/Desktop && awk -F'|' '{print "ROOT/" $2 "/" $3}' data.csv | xargs mkdir -p
and you would end up with the following already done

Let me explain how the script works. First it changes directory to your Desktop (cd ~/Desktop), and then, provided that worked (&&), it starts awk and tells it your fields on each line are separated by the vertical bar (awk -F'|'). awk will then read all the lines from data.csv, and split the fields and number them for you - so $1 will contain the CCDOC, $2 will contain the FamilyId, $3 will contain the PatientId. So for each line in the CSV file, we print ROOT/FamilyId/PatientId. In effect, the output of the awk script is as follows:
ROOT/F999/P5678
ROOT/F7777/P1111
ROOT/F999/P4321
However, we pass those lines into xargs and tell it to run mkdir -p on each one of them, so it effecively does this, which makes the folders I screen-grabbed above.
mkdir -p ROOT/F999/P5678
mkdir -p ROOT/F7777/P1111
mkdir -p ROOT/F999/P4321
If, rather than doing that from the Terminal, you wanted to do it from Applescript, you would simply put the same commands in a file and call it, say MarksThing
#!/bin/bash
cd ~/Desktop && awk -F'|' '{print "ROOT/" $2 "/" $3}' data.csv | xargs mkdir -p
then in Applescript, you would do
do shell script "MarksThing"
Though you would have to make it executable first with
chmod +x MarksThing
I know this doesn't completely answer your question but I still don't understand the rest of it. Rather than guess and waste a load of time, you can maybe answer my question (in the comments below your original question) and let me know if you are interested in pursuing this "non-Applescript" approach before I do too much more.
FamilyIDandPatientIDare of significance to this particular script and the rest can be ignored? And further, that you will only end up with say a few hundred folders at the top-level (1 per family) and 1-5(approx) folders in each of those? Nothing else? - Mark Setchellfamilyandpatient, and it's aRadiology, now what do I do? Create just Radiology, or do I have to create Radiology, Lab Tests, Finanacial, Images as well? And what do I do with the date? An example would be really useful !!!! - Mark Setchell