Картотека диагнозов

1. Имя файла: onl_ill.gml

gml [ color "lightgray" pixmap { return( PMAPS.."purple_marble.png") }
    grid [ color "pink" ]
    frame [ name "onl_ill" maximizable "true" iconifiable "true"
	title "Картотека диагнозов" modal "false"
	menubar [
	    include [
		src {
		    indexes = {
			{ name="i_cod => 'COD'       ", enable=false },
			{ name="i_code => 'CODE'     ", enable=false },
			{ name="i_nstr => 'NSTR'     ", enable=false },
			{ name="i_nstr2 => 'NSTR2'   ", enable=false },
			{ name="i_nstr3 => 'NSTR3'   ", enable=false },
			{ name="i_nstr4 => 'NSTR4'   ", enable=false },
			{ name="i_ns12 => 'NS12'     ", enable=false },
			{ name="i_ns14 => 'NS14'     ", enable=false },
			{ name="i_ns19 => 'NS19'     ", enable=false },
			{ name="i_ns31 => 'NS31'     ", enable=false },
			{ name="i_ns57 => 'NS57'     ", enable=false },
			count = 11
		    }
		    view = Ill
		    data = "ill"
		    base = ill
		    return( DEMO.."ils.gml")
		}
	    ]
	    include [
		src {
		    view = Ill
		    data = "ill"
		    base = ill
		    return( DEMO.."navi.gml")
		}
	    ]
	    include [
		src { return( DEMO.."prn_ill.gml") }
	    ]
	    menu [ str "Помощь" icon { return( ICONS.."help.png") }
		item [ str "Список полей"
		    src {
			fields = {
				"NK	 N 6	Номер карточки",
				"VID	 C 1	Вид диагноза",
				"COD	 C 4	Код МКБ",
				"GROUP	 C 3	Код группы",
				"KSG	 C 5	Код КСГ",
				"CODE	 C 6	Код диагноза",
				"NSTR	 C 4	Номер строки формы 12",
				"NS12	 C 4	Номер строки формы 12 по МКБ10",
				"NS14	 C 4	Номер строки формы 14 по МКБ10",
				"NSTR2   C 4    Номер строки формы 19",
				"NS19    C 4    Номер строки формы 19 по МКБ10",
				"NSTR3	 C 4	Номер строки формы 31",
				"NS31	 C 4	Номер строки формы 31 по МКБ10",
				"NSTR4	 C 4	Номер строки формы 16",
				"NS57	 C 4	Номер строки формы 57 по МКБ10",
				"NAME	 C 80	Наименование диагноза",
				"TYPE	 C 1	Тип диагноза",
				"DSP	 C 1	Признак диспансерности",
			    count = 18
			}
			title = "ILL.DBF"
			return( DEMO.."dbh.gml")
		    }
		]
	    ]
	    menu [ str "Выход" icon { return( ICONS.."exit.png") }
		item [ str "Выход"
		    include [
			str { onl_ill:close() }
		    ]
		]
	    ]
	]
	include [
	    src { return( DEMO.."l_ill.gml") }
	]
    ]
    rect [ color "black" ]
]

1. Имя файла: l_ill.gml

font [ name "Serif" size 16
    include [
	src { return( BASE.."ill_0.gml") }
    ]
    box [ type "col"
	include [
	    src { 
		task = "onl_ill.gml"
		data = "ill"
		base = ill
		return( DEMO.."header.gml")
	    }
	]
	list [ name "Ill" rows 20
#	    border "boxraised" title "Диагнозы"
	    selected [
		include [
		    str { ill.select = Ill:getSelectedIndex() + 1 }
		]
		emit [ signal "SELECTED" ]
	    ]
	    key [ name "F1"
		message [ title "Диалог" type "info" window "false"
		    str { return( "Номер записи " .. ill [ill.select].recno) }
		]
	    ]
	    include [
		src {
		    view = Ill
		    data = "ill"
		    base = ill
		    return( DEMO.."page.gml")
		}
	    ]
	    key [ name "ESCAPE"
		include [
		    str { onl_ill:close() }
		]
	    ]
	    head [
		field [ len 6 align "right" str "Номер" ]
		field [ len 6 str "МКБ" ]
		field [ len 6 str "КСГ" ]
		field [ len 50 str "Наименование диагноза" ]
	    ]
	    repeat [ name "J" from 1 step 1 until { return( ill.count) }
		item [
		    field [ align "right" str { return( ill [J:getValue()].nk) } ]
		    field [ str { return( ill [J:getValue()].cod) } ]
		    field [ str { return( ill [J:getValue()].ksg) } ]
		    field [ str { return( ill [J:getValue()].name) } ]
		]
	    ]
	    count { return( ill.count) }
	    select { return( ill.select - 1) }
	]
	box [ type "row"
	    label [ color "blue" str "Диагноз:" ]
	    space [ type "rigid" w 10 ]
	    label [ name "Name" len 65
		str { return( ill [ill.select].name) }
	    ]
	    space [ type "glue" ]
	]
    ]
    event [ signal "SELECTED"
	include [
	    str {
		Base:refresh()
		Name:refresh()
	    }
	]
    ]
]