描述

提供提纲数据给应用使用。

  • 获取当前选择文档的提纲数据。
  • 应用可根据提纲数据生成导航窗口

提纲数据提取条件

  • mode=0/1/3 时:段落设置了ID或设置了大纲级别,则会被提取到提纲中
  • mode=0/1/3 时:元素设置了ID则会被提取到提纲中,其所属直接段落或顶层段落也会被提取到提纲中
  • mode=2 时:获取所有的段落和元素

接口

json GetOutline(const char * jsonCfg)

jsonCfg参数

参数名 必填 类型 说明 备注
mode int 0: 默认模式,所有提取内容归属顶层段落
1: 所有提取内容归属直接段落,额外使用topParagraphId标识所属顶层段落
2: 获取全结构化的和xml结构一致的json数据组织结构
3: [大纲导航推荐模式]所有提取内容归属顶层段落, 返回结构更简洁

返回值

类型 说明 备注
object json对象

返回字段含义简单说明

字段名 说明 备注
object 对象类型
uuid 对象全文档唯一标识 生成提纲导航数据时带回
id 对象ID 对象ID属性
name 对象名称 对象Name属性
members 段落内成员 段落内具有身份信息的对象将会被提取

示例数据

  • 最外层为Section数组
  • 根据提纲数据生成跳转数据,详见接口GotoOutline使用方法

模式0:所有提取内容归属顶层段落

  • 在成员节点额外使用directParagraph标识直接段落信息
[
    {
        "object": "section",
        "header": [
            {
                "object": "header",
                "paragraphs": [
                    {
                        "object": "paragraph",
                        "id": "",
                        "uuid": "_2",
                        "name": "",
                        "docName": "ABC",
                        "alignHorizontalMode": 0,
                        "level": 0,
                        "mode": 0,
                        "headerStr": "($) ",
                        "forbidSeriesSplit": 0,
                        "splitParagraphMode": 0,
                        "hide": 0,
                        "locked": 0,
                        "dynamicLocked": 0,
                        "members": [
                            {
                                "directParagraph": {
                                    "id": "",
                                    "uuid": "_3",
                                    "hide": false
                                },
                                "object": "barCode",
                                "id": "门诊号",
                                "uuid": "门诊号_4",
                                "name": "",
                                "width": "1.51",
                                "height": "1.51",
                                "alignVerticalLayout": 0,
                                "data": "MTIzODg5OTk=",
                                "text": "12388999",
                                "type": 58,
                                "class": 0,
                                "showText": 1
                            }
                        ]
                    }
                ]
            }
        ],
        "footer": [
            {
                "object": "footer",
                "paragraphs": [

                ]
            }
        ],
        "body": {
            "object": "body",
            "paragraphs": [
                {
                    "object": "paragraph",
                    "id": "topp1",
                    "uuid": "topp1_7",
                    "name": "",
                    "docName": "ABC",
                    "alignHorizontalMode": 0,
                    "level": 0,
                    "mode": 0,
                    "headerStr": "($)",
                    "forbidSeriesSplit": 0,
                    "splitParagraphMode": 0,
                    "hide": 0,
                    "locked": 0,
                    "dynamicLocked": 0,
                    "members": [
                        {
                            "directParagraph": {
                                "id": "directpp1",
                                "uuid": "directpp1_8",
                                "hide": false
                            },
                            "object": "element",
                            "id": "name",
                            "uuid": "name_9",
                            "name": "",
                            "empty": false,
                            "text": "张小123二",   
                            "fragment": "<Fragment><Elementid='name'cfg='30000'xCfg='1'hint='请输入'sourceClass='基本资料'sourceId='姓名'>张小123二<\/Element><\/Fragment>",
                            "beginBorder": "",
                            "endBorder": "",
                            "beforeTag": "",
                            "afterTag": "",
                            "hint": "请输入",
                            "tips": "",
                            "width": "0.00",
                            "alignHorizontalMode": 0,
                            "hideKeyWord": 0,
                            "forbidDelete": false,
                            "lockedContent": false,
                            "lockedFormat": false,
                            "forbidSpace": false,
                            "forbidBackgroundEffects": 0,
                            "forbidFocusedEffects": 0,
                            "widthUnderline": false,
                            "allowJump": 0,
                            "fitContent": 0,
                            "displayBorder": 0,
                            "splitParagraphMode": 0,
                            "source": {
                                "sourceClass": "基本资料",
                                "sourceId": "姓名",
                                "dynamicLoad": 1,
                                "writeBack": 0
                            },
                            "algorithm": {

                            },
                            "inputHandle": {
                                "inputMode": 0
                            },
                            "qualityControl": {
                                "qcClass": 0,
                                "level": 0,
                                "forbidEmpty": 0,
                                "notice": "",
                                "exclude": "",
                                "useByteLen": 0,
                                "useMinLimit": 0,
                                "min": 0,
                                "useMaxLimit": 0,
                                "max": 0
                            },
                            "expressions": [

                            ]
                        }
                    ]
                }
            ]
        }
    }
]

模式1:所有提取内容归属直接段落

  • 在段落节点额外使用topParagraph标识顶层段落信息
[
    {
        "object": "section",
        "header": [
            {
                "object": "header",
                "paragraphs": [
                    {
                        "topParagraph": {
                            "id": "",
                            "uuid": "_2",
                            "hide": false
                        },
                        "object": "paragraph",
                        "id": "",
                        "uuid": "_5",
                        "name": "",
                        "docName": "ABC",
                        "alignHorizontalMode": 1,
                        "level": 0,
                        "mode": 0,
                        "headerStr": "($) ",
                        "forbidSeriesSplit": 0,
                        "splitParagraphMode": 0,
                        "hide": 0,
                        "locked": 0,
                        "dynamicLocked": 0,
                        "members": [
                            {
                                "object": "barCode",
                                "id": "门诊号",
                                "uuid": "门诊号_6",
                                "name": "",
                                "width": "1.51",
                                "height": "1.51",
                                "alignVerticalLayout": 0,
                                "data": "MTIzODg5OTk=",
                                "text": "12388999",
                                "type": 58,
                                "class": 0,
                                "showText": 1
                            }
                        ]
                    }
                ]
            }
        ],
        "footer": [
            {
                "object": "footer",
                "paragraphs": [

                ]
            }
        ],
        "body": {
            "object": "body",
            "paragraphs": [
                {
                    "topParagraph": {
                        "id": "topp1",
                        "uuid": "topp1",
                        "hide": false
                    },
                    "object": "paragraph",
                    "id": "directpp1",
                    "uuid": "directpp1_15",
                    "name": "",
                    "docName": "ABC",
                    "alignHorizontalMode": 0,
                    "level": 0,
                    "mode": 0,
                    "headerStr": "($) ",
                    "forbidSeriesSplit": 0,
                    "splitParagraphMode": 0,
                    "hide": 0,
                    "locked": 0,
                    "dynamicLocked": 0,
                    "members": [
                        {
                            "object": "element",
                            "id": "name",
                            "uuid": "name_16",
                            "name": "",
                            "empty": false,
                            "text": "张小123二",
                            "fragment": "<Fragment><Element id='name' cfg='30000' xCfg='1' hint='请输入' sourceClass='基本资料' sourceId='姓名'>张小123二<\/Element><\/Fragment>",
                            "beginBorder": "",
                            "endBorder": "",
                            "beforeTag": "",
                            "afterTag": "",
                            "hint": "请输入",
                            "tips": "",
                            "width": "0.00",
                            "alignHorizontalMode": 0,
                            "hideKeyWord": 0,
                            "forbidDelete": false,
                            "lockedContent": false,
                            "lockedFormat": false,
                            "forbidSpace": false,
                            "forbidBackgroundEffects": 0,
                            "forbidFocusedEffects": 0,
                            "widthUnderline": false,
                            "allowJump": 0,
                            "fitContent": 0,
                            "displayBorder": 0,
                            "splitParagraphMode": 0,
                            "source": {
                                "sourceClass": "基本资料",
                                "sourceId": "姓名",
                                "dynamicLoad": 1,
                                "writeBack": 0
                            },
                            "algorithm": {

                            },
                            "inputHandle": {
                                "inputMode": 0
                            },
                            "qualityControl": {
                                "qcClass": 0,
                                "level": 0,
                                "forbidEmpty": 0,
                                "notice": "",
                                "exclude": "",
                                "useByteLen": 0,
                                "useMinLimit": 0,
                                "min": 0,
                                "useMaxLimit": 0,
                                "max": 0
                            },
                            "expressions": [

                            ]
                        }
                    ]
                }
            ]
        }
    }
]

模式3:所有提取内容归属顶层段落-简洁模式

  • 在成员节点额外使用directParagraph标识直接段落信息
Θ 
┗ header
    ┗━paragraphs[]
            ┗━members[]footer
    ┗━paragraphs[]
            ┗━members[]body
    ┗━paragraphs[]
            ┗━members[]
{
    "header": [
        {
            "object": "paragraph",
            "name": "门诊号",
            "uuid": "adsqebbew1",
            "subDocName": "ABC",
            "members": [
                {
                    "directParagraph": {
                        "uuid": "adsqebbew2"
                    },
                    "object": "barCode",
                    "id": "门诊号",
                    "uuid": "门诊号"
                }
            ]
        }
    ],
    "footer": [

    ],
    "body": [
        {
            "object": "paragraph",
            "uuid": "",
            "subDocName": "ABC",
            "members": [
                {
                    "directParagraph": {
                        "uuid": ""
                    },
                    "object": "element",
                    "id": "name",
                    "uuid": "name"
                },
                {
                    "directParagraph": {
                        "uuid": ""
                    },
                    "object": "element",
                    "id": "DE02.01.009.01",
                    "uuid": "DE02.01.009.01"
                },
                {
                    "directParagraph": {
                        "uuid": ""
                    },
                    "object": "element",
                    "id": "DE02.01.009.02",
                    "uuid": "DE02.01.009.02"
                },
                {
                    "directParagraph": {
                        "uuid": ""
                    },
                    "object": "element",
                    "id": "DE02.01.009.03",
                    "uuid": "DE02.01.009.03"
                }
            ]
        },
        {
            "object": "paragraph",
            "id": "主诉",
            "uuid": "主诉",
            "subDocName": "ABC",
            "members": [
                {
                    "directParagraph": {
                        "id": "主诉",
                        "uuid": "主诉"
                    },
                    "object": "element",
                    "id": "简要诊断",
                    "uuid": "简要诊断"
                }
            ]
        },
        {
            "object": "paragraph",
            "uuid": "",
            "subDocName": "ABC",
            "members": [
                {
                    "directParagraph": {
                        "uuid": ""
                    },
                    "object": "element",
                    "id": "city",
                    "uuid": "city"
                }
            ]
        }
    ]
}
文档更新时间: 2026-01-16 15:36   作者:admin