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"), )
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, )
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, )
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], # )
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"), )
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, )
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, )
class IJingLuo(Interface): """经络: 足太阳膀胱经、足少阳胆经等 """ id = schema.Int(title=_(u"table primary key"), ) mingcheng = schema.TextLine(title=_(u"ming cheng"), )
class IYaoXing(Interface): """药性: 大热、热、平、大寒、寒 """ id = schema.Int(title=_(u"table primary key"), ) xing = schema.TextLine(title=_(u"yao xing"), )
class IYaoWei(Interface): """wu wei: 酸、苦、甘、辛、咸 """ id = schema.Int(title=_(u"table primary key"), ) wei = schema.TextLine(title=_(u"wu wei qizhong zhi yiwei"), )