Hi,
I'm looking to automate a task at work whereby a list of symptoms is inserted into a paragraph to create a clinical vignette representing a particular illness and how it might present to students.
The simplest way for me to do this is to create a series of arrays with the various symptoms comprising the arrays ( clinical signs, symptoms found on examination, findings in blood tests, findings on radiological investigation etc ).
My problem is that while I can extract ALL the symptoms from an array I am having a bit of difficulty finding a code example to extract only some of the elements of the array ( symptoms ).
The closest I can get theoretically is as follows:
1. have the computer randomly decide how many symptoms in each category it will place in the clinical vignette ( e.g 3 out of 10 clinical signs )
2. Assign a "weight" to each of the symptoms
e.g. high blood pressure is 1-20, open wound 20-25, fever, 25-40 etc up to 100
and have the computer randomly pick a number from 1 to 100. Whatever the number corresponds to is the symptom the programme then picks from the array and inserts into the sentence.
3. The programme then checks whether it has assigned the number of symptoms it has previously determined ( 3 in this case ) and if it hasn't it goes to step 2 and picks another symptom ( checking again that it isn't the symptom it previously picked ) and inserts it into the sentence.
In the end this would end up with something like "The patient presented with " Symptom 1 " and " symptom 2 " and "symptom 3". On clinical examination the following were found "clinical sign 1", "clinical sign 2" and "clinical sign 3"... etc etc.
Anyways, this just seems really inelegant to me and I'm sure there must be a better way to do it but I'm VERY rusty and the last time I used VB was back when it was VB 2005. I'd appreciate any pointers as to better functionality/easier implementation.


