Exemplo n.º 1
0
class IChuFang(Interface):
    """中药:
    人参、白术、甘草
    """
    id = schema.Int(title=_(u"table primary key"), )
    yisheng_id = schema.Int(title=_(u"foreagn key link to yisheng"), )
    mingcheng = schema.TextLine(title=_(u"ming cheng"), )
    yizhu = schema.TextLine(title=_(u"zhu zhi"), )
    jiliang = schema.Int(title=_(u"ji liang"), )
Exemplo n.º 2
0
class IBingRen(Interface):
    """病人:
    
    """
    id = schema.Int(title=_(u"table primary key"), )
    dizhi_id = schema.Int(title=_(u"foreagn key link to wei"), )
    xingming = schema.TextLine(
        title=_(u"xing ming"),
        required=True,
    )
    xingbie = schema.Choice(
        title=_(u"xing bie"),
        vocabulary='Chinese.medical.science.vocabulary.xiebie',
        required=True,
    )
    shengri = schema.Date(title=_(u"xing ming"), )
    dianhua = schema.TextLine(title=_(u"dian hua"), )
    dizhi = schema.Object(
        title=_(u"di zhi"),
        schema=IDiZhi,
    )
    # all chufangs of bingren
    chufangs = schema.Object(
        title=_(u"chu fang"),
        schema=IChuFang,
    )
Exemplo n.º 3
0
class IDanWei(Interface):
    """单位:
    任之堂
    """
    id = schema.Int(title=_(u"table primary key"), )
    dizhi_id = schema.Int(title=_(u"foreagn key link to wei"), )
    mingcheng = schema.TextLine(
        title=_(u"ming cheng"),
        required=True,
    )
    dizhi = schema.Object(
        title=_(u"di zhi"),
        schema=IDiZhi,
    )
Exemplo n.º 4
0
def xingbie(context):

    values = {1: _(u'nan'), 0: _(u'nv')}
    return SimpleVocabulary([
        SimpleTerm(value=int(i), token=str(i), title=values[i])
        for i in values.keys()
    ], )


# @provider(IVocabularyFactory)
# def donateId(context):
#
#     locator = getUtility(IDonateLocator)
# #     values = locator.query(start=0,size=100,multi=1,did=18,sortchildid=3)
#     values = locator.query(start=0,size=100,multi=1)
#     return SimpleVocabulary(
#         [SimpleTerm(value=int(i.did), token=str(i.did), title=i.aname) for i in values],
#     )
Exemplo n.º 5
0
class IDiZhi(Interface):
    """地址:
    中国 湖南 湘潭市 湘潭县云湖桥镇北岸村道林组83号
    """
    id = schema.Int(title=_(u"table primary key"), )
    guojia = schema.TextLine(
        title=_(u"guo jia"),
        required=True,
        default=u"中国",
    )
    sheng = schema.TextLine(
        title=_(u"sheng(state)"),
        required=True,
    )
    shi = schema.TextLine(
        title=_(u"shi (city)"),
        required=True,
    )
    jiadao = schema.TextLine(title=_(u"jie dao"), )
Exemplo n.º 6
0
class IYao(Interface):
    """中药:
    人参、白术、甘草
    """
    id = schema.Int(title=_(u"table primary key"), )
    yaowei_id = schema.Int(title=_(u"foreagn key link to wei"), )
    yaoxing_id = schema.Int(title=_(u"foreagn key link to yao xing"), )
    mingcheng = schema.TextLine(title=_(u"ming cheng"), )
    zhuzhi = schema.TextLine(title=_(u"zhu zhi"), )
    yaowei = schema.Object(
        title=_(u"gui jing"),
        schema=IJingLuo,
    )
    yaoxing = schema.Object(
        title=_(u"gui jing"),
        schema=IJingLuo,
    )
    guijing = schema.Object(
        title=_(u"gui jing"),
        schema=IJingLuo,
    )
Exemplo n.º 7
0
class IYiSheng(Interface):
    """余浩:
    
    """
    id = schema.Int(title=_(u"table primary key"), )
    danwei_id = schema.Int(title=_(u"foreagn key link to danwei"), )
    xingming = schema.TextLine(
        title=_(u"xing ming"),
        required=True,
    )
    xingbie = schema.Choice(
        title=_(u"xing bie"),
        vocabulary='Chinese.medical.science.vocabulary.xiebie',
        required=True,
    )
    shengri = schema.Date(title=_(u"xing ming"), )
    dianhua = schema.TextLine(title=_(u"dian hua"), )
    danwei = schema.Object(
        title=_(u"dan wei"),
        schema=IDanWei,
    )
Exemplo n.º 8
0
class IJingLuo(Interface):
    """经络:
    足太阳膀胱经、足少阳胆经等
    """
    id = schema.Int(title=_(u"table primary key"), )
    mingcheng = schema.TextLine(title=_(u"ming cheng"), )
Exemplo n.º 9
0
class IYaoXing(Interface):
    """药性:
    大热、热、平、大寒、寒
    """
    id = schema.Int(title=_(u"table primary key"), )
    xing = schema.TextLine(title=_(u"yao xing"), )
Exemplo n.º 10
0
class IYaoWei(Interface):
    """wu wei:
    酸、苦、甘、辛、咸
    """
    id = schema.Int(title=_(u"table primary key"), )
    wei = schema.TextLine(title=_(u"wu wei qizhong zhi yiwei"), )