# ----------------------------------
# - BBTKGEditor v 1.4 BBS BlackBox Script
-# - /Users/davila/CreatisWork/tmpCharly/creaBrainGrayMatter/appli/Appli_ceraGM/scripts/Comments.bbs
+# - /Users/davila/CreatisWork/tmpCharly/creaBrainGrayMatter/appli/creaPatientsSystem_MG/scripts/Comments.bbs
# ----------------------------------
# BBTK GEditor Script
include itkvtk
include std
include wx
+include creaMiniTools
author "Author ??"
description "Description ??"
new std:ConcatStrings Box15
new std:ConcatStrings Box07
- set Box07.In2 "/Comments.txt"
+ set Box07.In2 "/Comment-Informatic.txt"
new wx:LayoutTab Box31
set Box31.WinHeight "500"
new wx:LayoutLine Box32
new wx:InputText Box33
- set Box33.Title "Comment"
+ set Box33.Title "Informatic Comment"
new wx:CommandButton Box34
- set Box34.Label "Save"
+ set Box34.Label "Save and Exit"
new std:ReadLinesString Box11
new std:Exit Box21
-new wx:CommandButton Box24
- set Box24.Label "Exit"
-
new wx:LayoutCenter Box25
new wx:LayoutLine Box26
new std:ReplaceCleanString Box28
set Box28.Search "<PATIENT>"
+new std:ConcatStrings Box29
+ set Box29.In2 "/Comment-Scientific.txt"
-connect Box32.Widget Box31.Widget1
+new wx:InputText Box30
+ set Box30.Title "Scientific Comment"
+
+new std:ReadLinesString Box35
+
+new std:ReplaceString Box36
+ set Box36.Replace "/"
+ set Box36.Search "\"
+
+new std:StringWriter Box37
+
+new std:ConcatStrings Box38
+ set Box38.In2 "/Comment-General.txt"
+
+new wx:InputText Box39
+ set Box39.Title "General Comment"
+
+new std:ReadLinesString Box40
+
+new std:ReplaceString Box41
+ set Box41.Replace "/"
+ set Box41.Search "\"
+
+new std:StringWriter Box42
+
+new creaMiniTools:WriteStatePatientSystem Box43
+ set Box43.State "Finish"
+
+new std:ConcatStrings Box44
+
+new std:ConcatStrings Box45
+ set Box45.In2 "/Step_Comment.txt"
+
+new std:MultipleInputs Box46
-connect Box33.Widget Box32.Widget2
+new std:SplitFilePathVector Box47
+
+new std:ConcatStrings Box48
+ set Box48.In1 "mkdir -p "
+
+new std:ExecSystemCommand Box49
+
+
+connect Box32.Widget Box31.Widget1
connect Box11.Out Box33.In
connect Box18.Out Box20.FileName
-connect Box34.BoxChange Box20.BoxExecute
-
connect Box33.Out Box20.In0
-connect Box24.BoxChange Box21.BoxExecute
-
-connect Box24.Widget Box26.Widget2
-
connect Box34.Widget Box26.Widget1
-connect Box25.Widget Box32.Widget3
-
connect Box26.Widget Box25.Widget2
connect Box28.Out Box27.In3
+connect Box35.Out Box30.In
+
+connect Box29.Out Box36.In
+
+connect Box36.Out Box35.FileName
+
+connect Box36.Out Box37.FileName
+
+connect Box30.Out Box37.In0
+
+connect Box40.Out Box39.In
+
+connect Box38.Out Box41.In
+
+connect Box41.Out Box40.FileName
+
+connect Box41.Out Box42.FileName
+
+connect Box39.Out Box42.In0
+
+connect Box27.Out Box29.In1
+
+connect Box27.Out Box38.In1
+
+connect Box25.Widget Box32.Widget8
+
+connect Box39.Widget Box32.Widget2
+
+connect Box30.Widget Box32.Widget4
+
+connect Box33.Widget Box32.Widget6
+
+
+connect Box44.Out Box43.User
+
+connect Box27.Out Box45.In1
+
+connect Box45.Out Box43.Filename
+
+connect Box34.BoxChange Box46.BoxExecute
+
+connect Box21.BoxChange Box46.In9
+
+connect Box41.Out Box47.In
+
+connect Box47.Path Box48.In2
+
+connect Box48.Out Box49.In
+
+connect Box43.boxChange Box46.In7
+
+connect Box20.BoxChange Box46.In5
+
+connect Box37.BoxChange Box46.In4
+
+connect Box42.BoxChange Box46.In2
+
+connect Box49.BoxChange Box46.In1
+
# Complex input ports
input BaseDir Box15.In1 " "
input PatientID Box19.In1 " "
input CoreID Box22.In1 " "
+input creaUser Box44.In1 " "
exec Box31