service { const html Intro = Hello, this is Dr. Suresh, your electronic psychiatrist. What is your name? ; const html Postintro = Welcome <[name]>, tell me about why you came to see me. ; const html Feel = Uh huh\, and how does that make you feel? ; const html Elaborate = Please elaborate. ; const html Think = Why do you think that? ; const html Why = Why? ; const html Hug = Do you need a hug? Yes ; const html Yes = *HUG* I hope you feel better. I think you should play a lot of sports and get your endorphin level up. This has been a productive meeting. That will be $50. Thank you, come again. ; const html No= That's fine. I don't even have arms. I have another appointment so we'll stop our meeting here. That will be $50. Thank you, come again. ; const html record = For your record:
<[name]>
Reason why you are talking to an electronic psychiatrist:
<[reason]>
Feeling:
<[feeling]>
Elaborate:
<[elaborate]>
Why you think the way you do:
<[think]>
Why
<[why1]>
Why
<[why2]>
Why
<[why3]>
; schema recording { string name; string reason; string feeling; string elaborate; string think; string whyone; string whytwo; string whythree; } tuple recording Record; session Interrogate() { int i; string name, problem, feeling, elaboration,thoughts, whyone, whytwo,whythree, hug; show Intro receive [name = name]; Record.name=name; show plug Postintro [name = name] receive[problem= problem]; Record.reason=problem; show Feel receive [feeling = feel]; Record.feeling=feeling; show Elaborate receive [ elaboration =explain]; Record.elaborate=elaboration; show Think receive [thoughts = think]; Record.think= thoughts; i=0; show Why receive [whyone = why]; Record.whyone=whyone; show Why receive [whytwo = why]; Record.whytwo=whytwo; show Why receive [whythree = why]; Record.whythree=whythree; show Hug receive [hug = hug]; if (hug=="yes"){ show Yes; } else{ show No; } exit plug record [name=Record.name, reason=Record.reason, feeling=Record.feeling, elaborate=Record.elaborate, think=Record.think, why1=Record.whyone, why2=Record.whytwo, why3=Record.whythree]; } }