Author Topic: LIGHTSPEED'S MEDICAL TALK LS PLUG IN  (Read 12360 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #15 on: December 30, 2013, 09:50:02 am »
Yes Art i put lower case on all the "user" sentence area does it matter , is it case sensitive ??
I will Correct the users word all with a capital U at the beginning and see if it stops the error !
« Last Edit: December 30, 2013, 09:54:00 am by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #16 on: December 30, 2013, 11:39:42 am »
Okay Art , i changed that but still am getting the same error , so i decided i had checked everything else so i was going to go through the number and get responses area's again maybe i did something wrong their . and i found this .

Case 9
GetResponse = "Well as far as Cancer Support, Supportive care from nurses and other professionals should accompany cancer treatment, The goal is to relieve pain and other symptoms, maintain general health, improve quality of life, and provide emotional, psychological, and logistical support to patients and their families!"
Case 11
GetResponse = "supportive cancer treatment is available to rehabilitate patients after curative treatment, Supportive therapy such as hospice care for cancer patients nearing the end of their lives provides relief from pain and other irreversible symptoms, Most mainstream care is geared toward providing supportive treatment through the broad resources of a cancer treatment center, Complementary cancer therapies, which are generally provided outside a hospital, can also provide supportive care."

NOTICE I SKIPPED NUMBER 10 IN THE NUMBERS .

and got another error and i found this :

can affect the amount of insulin you withdraw for an injection!"
Case 22
GetResponse = "As far as when a person should take their insulin, If you have diabetes, follow your health care provider's guidelines on when to take your insulin, The time span between your insulin injection and meals may vary depending on the type of insulin you are taking, For example, if you use a rapid-acting insulin, you should generally take it 10 minutes before eating a meal, or take it with your meal!"
Case 13
GetResponse = "As far as when a person should take their insulin, If you use regular- or intermediate-acting insulin, you should generally take it about one half-hour before your meals, or at bedtime, By taking your insulin one half-hour before meals, you are allowing your food to be absorbed at the same time that the insulin starts to work, This will help you avoid low blood sugar reactions."

13 should be 23 .
i also found this error later :

Case 20
GetResponse = "Urinary incontinence isn't an inevitable result of aging, Most women who have it can be helped or cured, The best treatment depends on the cause of your incontinence and your personal preferences, Treatments include, Behavioral training, such as bladder training and timed urination." 
Case 22
GetResponse = "If you’ve recently been diagnosed with overactive bladder or OAB, ask your doctor these questions at your next visit, Are there medications I can take to treat my OAB, What side-effects might the medication cause, and what can I do to manage them, How quickly do the medications take effect, What if the medications don't work for me, Are there other treatment options, If my OAB gets better, can I stop taking the medication, Are there foods or beverages I should avoid to keep from making my OAB worse, Are there other lifestyle steps I can take to help manage my OAB, Is there a support group where I can talk to other people who have OAB, How might my intimate relationship be affected by my OAB or the treatment for it, What new OAB treatments are being developed, and are there clinical trials I could participate in?"
I missed 21 !!

These were causing a hal error1002 on line 1785 in column 21 and column 22 . SYNTAX ERROR .

WELL i now messed part of it up i was removing parts two at a time placing them in a txt file . and restarting the plug in to see what parts were bad by deduction and my wife had the pc radio going etc. on her pc and i gort messed up listening to her game playing and a radio show on at the same time . so i will now have to recopy some work and straighten it back out when i am in the room by myself without all the noise and distraction !



 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #17 on: December 30, 2013, 01:43:05 pm »
Okay i am back again working on this , i guess i didn't lose part of my stuff , but did wait till my wife is in the other room watching tv , so now i have it quiet to work in here . so i am removing each section and re testing the plug in to find the problem area . sometimes this stuff can be enough to drive a person crazy! will write when i have found the problem .
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #18 on: December 30, 2013, 04:26:37 pm »
well i removed different sections and when i got down to this one (removed ) the errors stopped , i put it back in and got the error . syntax

does anyone see whats wrong with this area of the plug in ???





If InStr(1, UserSentence, "pneumonia") > 0 Then


Randomize
Select Case (Int(Rnd( * 12)+ 1)
Case 1
GetResponse = "What is pneumonia, Pneumonia is a lung infection that can make you very sick, You may cough, run a fever, and have a hard time breathing, For most people, pneumonia can be treated at home, It often clears up in 2 to 3 weeks, But older adults, babies, and people with other diseases can become very ill, They may need to be in the hospital."
Case 2
GetResponse = "You can get pneumonia in your daily life, such as at school or work, This is called community associated pneumonia, You can also get it when you are in a hospital or nursing home, This is called healthcare associated pneumonia, It may be more severe because you already are ill, This topic focuses on pneumonia you get in your daily life, What causes pneumonia, Germs called bacteria or viruses usually cause pneumonia."
Case 3
GetResponse = "Pneumonia usually starts when you breathe the germs into your lungs, You may be more likely to get the disease after having a cold or the flu, These illnesses make it hard for your lungs to fight infection, so it is easier to get pneumonia, Having a long-term, or chronic, disease like asthma, heart disease, cancer, or diabetes also makes you more likely to get pneumonia."
Case 4
GetResponse = "What are the symptoms, Symptoms of pneumonia caused by bacteria usually come on quickly, They may include a Cough, You will likely cough up mucus, sputum from your lungs, Mucus may be rusty or green or tinged with blood, Fever, Fast breathing and feeling short of breath, Shaking and teeth chattering chills, You may have this only one time or many times, Chest pain that often feels worse when you cough or breathe in, Fast heartbeat, Feeling very tired or feeling very weak, Nausea and vomiting, Diarrhea."
Case 5
GetResponse = "With Pneumonia, When you have mild symptoms, your doctor may call this a walking pneumonia, Older adults may have different fewer, or milder symptoms, They may not have a fever, Or they may have a cough but not bring up mucus, The main sign of pneumonia in older adults may be a change in how well they think, Confusion or delirium is common, Or, if they already have a lung disease, that disease may get worse."
Case 6
GetResponse = "As far as Pneumonia, Symptoms caused by viruses are the same as those caused by bacteria, But they may come on slowly and often are not as obvious or as bad, How is pneumonia diagnosed, Your doctor will ask you about your symptoms and do a physical exam, He or she may order a chest X-ray and a blood test, This is usually enough for your doctor to know if you have pneumonia, You may need more tests if you have bad symptoms, are an older adult, or have other health problems, In general, the sicker you are, the more tests you will have."
Case 7
GetResponse = "Home treatment is important for recovery from pneumonia, The following measures can help you recover and avoid complications, Get plenty of rest, Drink plenty of fluids to prevent dehydration, Take care of your cough if it is making it hard for you to rest, A cough is one way your body gets rid of the infection, And you should not try to stop your coughing unless it is severe enough to make breathing difficult, cause vomiting, or prevent rest, Consider taking acetaminophen, such as Tylenol, or aspirin to help reduce fever and make you feel more comfortable, Do not give aspirin to anyone younger than 20 because of the risk of Reye syndrome, Your doctor may want to see you after a week of treatment to make sure you are getting better, Be sure to contact your doctor if you do not feel better, your cough gets worse, you have shortness of breath or a fever, you feel weak, or you feel faint when you stand up."
Case 8
GetResponse = "As far as Pneumonia with home treatments, with Cough and cold medicines, Be careful with cough and cold medicines, They may not be safe for young children or for people who have certain health problems, so check the label first, If you do use these medicines, always follow the directions about how much to use based on age and weight, Always check to see if any over-the-counter cough or cold medicines you are taking contain acetaminophen, If they do, make sure the acetaminophen you are taking in your cold medicine plus any other
acetaminophen you may be taking is not higher than the daily recommended dose, Ask your doctor or pharmacist how much you can take every day."
Case 9
GetResponse = "What Increases Your Risk of getting Pneumonia, You are more likely to get pneumonia if you, Smoke, Cigarette smoking is the strongest risk factor for pneumonia in healthy young people, 2 Have another medical condition, especially lung diseases such as chronic obstructive pulmonary disease, COPD, or asthma, Or Are younger than 1 year of age or older than 65, Have an impaired immune system, Take medicine called a proton pump inhibitor, such as Prilosec or Protonix, that reduces the amount of stomach acid, 3, 4, Drink excessive amounts of alcohol, Recently had a cold or the flu."
Case 10
GetResponse = "You are more likely to have complications of pneumonia and may need to go to the hospital if you, Are older than 65, Have some other illness, such as COPD, diabetes, or asthma, or have gone to the hospital for a medical problem within the last 3 months, or Have had your spleen removed or do not have a working spleen, such as in sickle cell disease, Have an alcohol use problem, Have a weak immune system, Reside in a place where people live close together, such as a college dorm or nursing home."
Case 11
GetResponse = "With Pneumonia and Medications, Doctors use antibiotics to treat pneumonia caused by bacteria, There are many types of antibiotics, Your doctor will decide which antibiotic will work best for you, In most cases, your doctor will prescribe antibiotics without first identifying the exact organism causing the illness."
Case 12
GetResponse = "As for Antibiotics for Pneumonia, Although experts differ on their recommendations, the first antibiotic used is usually one that kills a wide range of bacteria, broad-spectrum antibiotic, All antibiotics used have a high cure rate for pneumonia, If you don't get better with your first antibiotic, your doctor may add a second antibiotic to cover other bacteria that are not being treated with the first one, Or you may have more testing to identify the specific organism that is causing the pneumonia, Sometimes doctors use two antibiotics when first starting treatment."
End Select



HalBrain.ReadOnlyMode = True
End If

I have been over it and over it and don't see whats wrong with it?
 

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #19 on: December 30, 2013, 07:12:19 pm »
first:
If InStr(1, UserSentence, "pneumonia") > 0 Then

needs to be:
If InStr(1, UserSentence, "PNEUMONIA") > 0 Then
FOR HAL TO SEE IT. IT NEEDS TO BE IN ALL CAPS.

YOU NEED TO MAKE THIS 1 LINE:
Case 8
GetResponse = "As far as Pneumonia with home treatments, with Cough and cold medicines, Be careful with cough and cold medicines, They may not be safe for young children or for people who have certain health problems, so check the label first, If you do use these medicines, always follow the directions about how much to use based on age and weight, Always check to see if any over-the-counter cough or cold medicines you are taking contain acetaminophen, If they do, make sure the acetaminophen you are taking in your cold medicine plus any other <===( MAKE THIS 1 LINE )
acetaminophen you may be taking is not higher than the daily recommended dose, Ask your doctor or pharmacist how much you can take every day."
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #20 on: December 31, 2013, 09:03:46 am »
HelloCload , Art etc. well i just tried exactly what you said made that one a complete sentence ( i was using word wrap before and it wouldn't allow me to back the sentence up without running the words together ) i capitalized the whole word PNEUMONIA as you said am still getting the error .
i am trying some other things after i get back from town later today .
it's a mystery charlie brown !
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #21 on: December 31, 2013, 11:25:29 am »
Lonnie,

Are you still getting a hal error1002 on line 1785 in column 21 and column 22 . SYNTAX ERROR ?

If so, the Syntax indicates something is misspelled or used incorrectly or missing punctuation like bracket or CAPS, etc.

Did you look at the line in question with something like Crimson Editor that shows line numbers or something similar?
If so could you do a screen capture or show us the error line in question?
In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #22 on: December 31, 2013, 11:30:41 pm »
Art , i am running across more mistakes i made , spaces , etc. but am getting it sorted out am going through it one by one .

This was a big plug in , that's why i had to stop and get away from it before for a while .
I'll get it straightened out eventually .
 

systemshock

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #23 on: January 09, 2014, 07:12:45 am »
Awesome work dude, the more code we have the more things we can make of what we discover.
"frog's in too princess's" it just basic NLP...

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #24 on: January 09, 2014, 09:58:45 am »
I will be back working on this as soon as i can but still am battling a cough and don't want t work on this until i can give it my full attention to catch mistakes and correct it .
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #25 on: January 10, 2014, 02:01:35 pm »
Okay i am back trying to work on this plug in problem once again .on and off it .
i went back to my original roots and "may " have found the culprit for syntax errors .
 my original one works but when i changed it like cload mentioned before i get the error .

example MY ORIGINAL WAY:

If InStr(1, OriginalSentence, "a cold") > 0 _
Or InStr(1, OriginalSentence,"flu") > 0 Then
 
Randomize
Select Case int(rnd()*27)



CLOADS WAY :

File = ""
File2 = ""
File3 = ""
File4 = ""

If InStr(1, OriginalSentence, "a cold") > 0 _
Or InStr(1, OriginalSentence,"flu") > 0 Then
 
Randomize
Select Case (Int(Rnd( * 27)+ 1)

So either Cload told me wrong by accident "OR" i made a mistake and put this part in wrong .
does anyone "Art<etc." know if i made a mistake on Cloads instruction ?
could this part be wrong ?  (Int(Rnd

i just tried it this way :
If InStr(1, OriginalSentence, "a cold") > 0 _
Or InStr(1, OriginalSentence,"flu") > 0 Then
 
Randomize
Select Case Select Case (int(rnd()*27)+1)

still got a syntax  error
:P
« Last Edit: January 10, 2014, 02:13:20 pm by lightspeed »
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6765
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #26 on: January 10, 2014, 02:25:36 pm »
Okay upon further testing i found out that by leaving off the last ")" that the plug in started working okay .
example :
Cloads way :

Select Case (Int(Rnd( * 27)+ 1)

and now i left off the ")" after the +1 .
making it :
Select Case (Int(Rnd( * 27)+ 1
and it does now work this way .

As to weather it is working as Cload thought it should i don't know , Cload thought maybe my original script may not be working correctly (i guess randomly choosing all the various sentences .) and that with the plus one was the actual correct way from what he said .

i will later go back over all these and correct them . now to let my brain rest a bit lol! ;)
 

onthecuttingedge2005

  • Guest
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #27 on: January 10, 2014, 04:02:11 pm »
Select Case Int(Rnd * 27)+ 1

cload

  • Hero Member
  • *****
  • Posts: 535
  • I can C U load. TeeHee hee.
    • View Profile
    • A link to my sky Drive
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #28 on: January 10, 2014, 06:05:13 pm »
hi all,

Quote
first:
If InStr(1, UserSentence, "pneumonia") > 0 Then

needs to be:
If InStr(1, UserSentence, "PNEUMONIA") > 0 Then
FOR HAL TO SEE IT. IT NEEDS TO BE IN ALL CAPS.
meaning:
a flu needs to be A FLU
a cold needs to be A COLD
and so on.
like I said; your key words need to be in all cap.

It looks like OTC's way and VR's way work the same.
Select Case Int(Rnd * 27)+ 1
Select Case (Int(Rnd * 27)+ 1)

C load.
« Last Edit: January 10, 2014, 06:10:43 pm by cload »
For anyone who would like to help me stay online, my T-mobile broadband pay-as-you-go phone number is: 816-248-4335, thank you in advance.

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3859
    • View Profile
Re: LIGHTSPEED'S MEDICAL TALK LS PLUG IN
« Reply #29 on: January 10, 2014, 10:00:06 pm »
Lightspeed,

They are like an equation in that there must be the same number of parenthesis on each side of the expression.

( ( ( * ) ) ) never ( ( (*) )
In the world of AI it's the thought that counts!

- Art -