Jelajahi Sumber

电子病历临时存储

gaodm 4 tahun lalu
induk
melakukan
bf1a91f035

+ 19 - 0
src/main/java/com/diagbot/config/IdcConfigurer.java

@@ -0,0 +1,19 @@
+package com.diagbot.config;
+
+import com.diagbot.idc.VisibleIdCreater;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Description: ID生成器配置
+ * @author: gaodm
+ * @time: 2018/9/20 10:43
+ */
+@Configuration
+public class IdcConfigurer {
+
+    @Bean
+    public VisibleIdCreater visibleIdCreater() {
+        return new VisibleIdCreater(0, 0);
+    }
+}

+ 18 - 1
src/main/java/com/diagbot/config/RedisConfigurer.java

@@ -37,6 +37,8 @@ public class RedisConfigurer extends CachingConfigurerSupport {
     @Value("${spring.redis.database.cache}")
     private String databaseCache;
     @Value("${spring.redis.database.token}")
+    private String databaseToken;
+    @Value("${spring.redis.database.mr}")
     private String databaseMr;
     @Value("${spring.redis.host}")
     private String host;
@@ -145,7 +147,7 @@ public class RedisConfigurer extends CachingConfigurerSupport {
      */
     @Bean("factoryForToken")
     public LettuceConnectionFactory redisConnectionFactoryForToken() {
-        return getRedisConnectionFactory(Integer.valueOf(databaseMr));
+        return getRedisConnectionFactory(Integer.valueOf(databaseToken));
     }
 
     @Bean(name = "redisTemplateForToken")
@@ -153,6 +155,21 @@ public class RedisConfigurer extends CachingConfigurerSupport {
         return getRedisTemplate(factory);
     }
 
+    /**
+     * 电子病历使用的redis
+     *
+     * @return
+     */
+    @Bean("factoryForMr")
+    public LettuceConnectionFactory redisConnectionFactoryForIdc() {
+        return getRedisConnectionFactory(Integer.valueOf(databaseMr));
+    }
+
+    @Bean(name = "redisTemplateForMr")
+    public RedisTemplate<String, Object> redisTemplateForIdc(@Qualifier("factoryForMr") LettuceConnectionFactory factory) {
+        return getRedisTemplate(factory);
+    }
+
 
     private LettuceConnectionFactory getRedisConnectionFactory(Integer database) {
         RedisStandaloneConfiguration connection = new RedisStandaloneConfiguration();

+ 4 - 2
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -42,8 +42,10 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/sys/user/checkToken").permitAll()
                 .antMatchers("/oauth/token").permitAll()
                 .antMatchers("/oauth/check_token").permitAll()
-                .antMatchers("/versionInfo/getVersionInfoAlls").permitAll()
-                .antMatchers("/disclaimerInfo/getDisclaimerInfo").permitAll()
+                .antMatchers("/sys/versionInfo/getVersionInfoAlls").permitAll()
+                .antMatchers("/sys/disclaimerInfo/getDisclaimerInfo").permitAll()
+                .antMatchers("/sys/mr/createMr").permitAll()
+                .antMatchers("/sys/mr/getMr").permitAll()
                 .antMatchers("/sysPlan/getSysPlanInfoDatas").permitAll()
                 .antMatchers("/**").authenticated();
 //                .antMatchers("/**").permitAll();

+ 5 - 3
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -85,9 +85,11 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/sys/user/checkToken", request)
                 || matchers("/oauth/token", request)
                 || matchers("/oauth/check_token", request)
-                || matchers("/versionInfo/getVersionInfoAlls", request)
-                || matchers("/disclaimerInfo/getDisclaimerInfo", request)
-                || matchers("/sysPlan/getSysPlanInfoDatas", request)
+                || matchers("/sys/versionInfo/getVersionInfoAlls", request)
+                || matchers("/sys/disclaimerInfo/getDisclaimerInfo", request)
+                || matchers("/sys/mr/createMr", request)
+                || matchers("/sys/mr/getMr", request)
+                 || matchers("/sysPlan/getSysPlanInfoDatas", request)
                 || matchers("/", request)) {
             return true;
         }

+ 13 - 0
src/main/java/com/diagbot/facade/MrFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.MrServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description: 病历保存到redis装饰层
+ * @author: gaodm
+ * @time: 2019/8/28 16:25
+ */
+@Component
+public class MrFacade extends MrServiceImpl {
+}

+ 39 - 0
src/main/java/com/diagbot/idc/AbstractIdCreater.java

@@ -0,0 +1,39 @@
+package com.diagbot.idc;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Description: ID生成抽象类接口
+ * @author: gaodm
+ * @time: 2018/9/5 9:20
+ */
+public abstract class AbstractIdCreater<T> implements IdCreater<T> {
+
+    protected int machineId;
+    protected int dataCenterId;
+
+    public AbstractIdCreater(int machineId, int dataCenterId) {
+        this.machineId = machineId;
+        this.dataCenterId = dataCenterId;
+    }
+
+    @Override
+    public abstract Long getNextId(T param);
+
+    @Override
+    public abstract Long getNextShortId(T param);
+
+    @Override
+    public List<Long> getNextIds(T param, int size) {
+        List<Long> longs = new ArrayList<>(size);
+        for (int i = 0; i < size; i++) {
+            longs.add(getNextId(param));
+        }
+        return longs;
+    }
+
+    protected long timeGen() {
+        return System.currentTimeMillis();
+    }
+}

+ 33 - 0
src/main/java/com/diagbot/idc/IdCreater.java

@@ -0,0 +1,33 @@
+package com.diagbot.idc;
+
+import java.util.List;
+
+/**
+ * @Description: ID生成接口
+ * @author: gaodm
+ * @time: 2018/9/5 9:21
+ */
+public interface IdCreater<T> {
+
+    /**
+     * 生成一个id
+     *
+     * @return 生成的id
+     */
+    Long getNextId(T param);
+
+    /**
+     * 生成一个id
+     *
+     * @return 生成的id
+     */
+    Long getNextShortId(T param);
+
+    /**
+     * 批量生成id
+     *
+     * @param size 生成数量
+     * @return 生成的id列表
+     */
+    List<Long> getNextIds(T param, int size);
+}

+ 112 - 0
src/main/java/com/diagbot/idc/VisibleIdCreater.java

@@ -0,0 +1,112 @@
+package com.diagbot.idc;
+
+
+import com.diagbot.util.DateUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.RandomUtils;
+import org.apache.commons.lang3.time.DateUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.Calendar;
+
+/**
+ * @Description: 可见id每秒递增
+ * @author: gaodm
+ * @time: 2018/9/5 10:45
+ */
+@Slf4j
+public class VisibleIdCreater extends AbstractIdCreater<Integer> {
+
+    private long lastTimestamp = -1L;
+
+    private long sequence = 0L;
+    private long sequenceMask = 9999;
+
+    public VisibleIdCreater(int machineId, int dataCenterId) {
+        super(machineId, dataCenterId);
+    }
+
+    /**
+     * 对外id生成规则
+     * 180905123451110001
+     * 180905 - 12345 -  1   -  1   -     1     - 0001
+     * 日期 -  秒数  - 业务 - 机器 - 数据中心 - 秒内自增
+     *
+     * @param type 业务id 1.订单 2.交易 3.退款
+     * @return 生成的id
+     */
+    @Override
+    public synchronized Long getNextId(Integer type) {
+
+        Calendar calendar = Calendar.getInstance();
+
+        long timestamp = timeGen() / 1000;
+
+        if (timestamp < lastTimestamp) {
+            log.error(String.format("clock is moving backwards. Rejecting requests until %d.", lastTimestamp));
+            throw new RuntimeException(String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
+        }
+
+        if (lastTimestamp == timestamp) {
+            sequence = (sequence + 1);
+            if (sequence > sequenceMask) {
+                //timestamp = tilNextMillis(lastTimestamp);
+                log.error(String.format("id creater sequence is full. wait to next time"));
+                return null;
+            }
+        } else {
+            sequence = getNewSequence();
+        }
+
+        lastTimestamp = timestamp;
+
+        String date = DateUtil.format(calendar.getTime(), "yyMMdd");
+        long seconds = DateUtils.getFragmentInSeconds(calendar, Calendar.DAY_OF_YEAR);
+
+        return Long.valueOf(date + String.format("%05d", seconds) + String.valueOf(type) + machineId + dataCenterId + sequence);
+    }
+
+    /**
+     * 对外id生成规则
+     * 1809051234550001
+     * 180905 - 12345 -  1  - 0001
+     * 日期 -  秒数  - 业务 - 秒内自增
+     *
+     * @param type 业务id 1.订单 2.交易 3.退款
+     * @return 生成的id
+     */
+    @Override
+    public synchronized Long getNextShortId(Integer type) {
+        Calendar calendar = Calendar.getInstance();
+
+        long timestamp = timeGen() / 1000;
+
+        if (timestamp < lastTimestamp) {
+            log.error(String.format("clock is moving backwards. Rejecting requests until %d.", lastTimestamp));
+            throw new RuntimeException(String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
+        }
+
+        if (lastTimestamp == timestamp) {
+            sequence = (sequence + 1);
+            if (sequence > sequenceMask) {
+                //timestamp = tilNextMillis(lastTimestamp);
+                log.error(String.format("id creater sequence is full. wait to next time"));
+                return null;
+            }
+        } else {
+            sequence = getNewSequence();
+        }
+
+        lastTimestamp = timestamp;
+
+        String date = DateUtil.format(calendar.getTime(), "yyMMdd");
+        long seconds = DateUtils.getFragmentInSeconds(calendar, Calendar.DAY_OF_YEAR);
+
+        return Long.valueOf(date + String.format("%05d", seconds) + String.valueOf(type) + sequence);
+    }
+
+    private long getNewSequence() {
+        return RandomUtils.nextInt(1000, 2000);
+    }
+
+}

+ 28 - 0
src/main/java/com/diagbot/service/MrService.java

@@ -0,0 +1,28 @@
+package com.diagbot.service;
+
+import com.diagbot.vo.PushJoinVO;
+
+/**
+ * @Description: 病历保存到redis接口
+ * @author: gaodm
+ * @time: 2019/8/28 16:25
+ */
+public interface MrService {
+
+    /**
+     * 创建病历信息
+     *
+     */
+    String createMr(PushJoinVO imgVerInfo);
+
+    /**
+     * 获取病历信息
+     *
+     */
+    PushJoinVO getMr(String mrId);
+
+    /**
+     * 删除病历信息
+     */
+    Boolean deleteMr(String mrId);
+}

+ 120 - 0
src/main/java/com/diagbot/service/impl/MrServiceImpl.java

@@ -0,0 +1,120 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.idc.VisibleIdCreater;
+import com.diagbot.service.MrService;
+import com.diagbot.util.DateUtil;
+import com.diagbot.vo.PushJoinVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.dao.DataAccessException;
+import org.springframework.data.redis.connection.RedisConnection;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+/**
+ * @Description: 病历保存到redis接口实现
+ * @author: gaodm
+ * @time: 2019/8/28 16:25
+ */
+@Service
+@Slf4j
+public class MrServiceImpl implements MrService {
+    @Autowired
+    @Qualifier("redisTemplateForMr")
+    private RedisTemplate redisForMr;
+
+    @Autowired
+    private VisibleIdCreater visibleIdCreater;
+
+    private byte[] serializeKey(Object o) {
+        return redisForMr.getKeySerializer().serialize(o);
+    }
+
+    private byte[] serializeValue(Object o) {
+        return redisForMr.getValueSerializer().serialize(o);
+    }
+
+    private Object deserializeValue(byte[] b) {
+        return redisForMr.getValueSerializer().deserialize(b);
+    }
+
+    private byte[] getMrKey(String mrId) {
+        String mrFormat = "mr_%s";
+        return serializeKey(String.format(mrFormat, mrId));
+    }
+
+
+    /**
+     * 创建病历信息
+     */
+    @Override
+    public String createMr(PushJoinVO pushJoinVO) {
+        Date now = DateUtil.now();
+        final Date expireDate = DateUtil.addMinutes(now, 3);
+        pushJoinVO.setCreateTime(now);
+        pushJoinVO.setExpireTime(expireDate);
+        pushJoinVO.setExpireTimeStr(DateUtil.format(expireDate, "yyyy-MM-dd HH:mm:ss"));
+        String mrId = visibleIdCreater.getNextId(8).toString();
+        pushJoinVO.setMrId(mrId);
+        final byte[] redis_key = getMrKey(mrId);
+        redisForMr.execute(new RedisCallback<Object>() {
+            @Override
+            public Object doInRedis(RedisConnection connection) throws DataAccessException {
+                //获取旧的
+                byte[] bytes = connection.get(redis_key);
+                //删除旧的
+                if (bytes != null) {
+                    connection.del(bytes);
+                }
+                //设置新的
+                connection.setEx(
+                        redis_key,
+                        (expireDate.getTime() - DateUtil.now().getTime()) / 1000,
+                        serializeValue(pushJoinVO)
+                );
+                return true;
+            }
+        });
+        return mrId;
+    }
+
+    /**
+     * 获取病历信息
+     */
+    @Override
+    public PushJoinVO getMr(String mrId) {
+        return (PushJoinVO) redisForMr.execute(new RedisCallback<Object>() {
+            @Override
+            public Object doInRedis(RedisConnection connection) throws DataAccessException {
+                byte[] redis_key = getMrKey(mrId);
+                byte[] bytes = connection.get(redis_key);
+                if (bytes == null) {
+                    return null;
+                }
+                return deserializeValue(bytes);
+            }
+        });
+    }
+
+    /**
+     * 删除用户短信验证码信息
+     */
+    /**
+     * 删除病历信息
+     */
+    @Override
+    public Boolean deleteMr(String mrId) {
+        final byte[] redis_key = getMrKey(mrId);
+        Long l = (Long) redisForMr.execute(new RedisCallback<Long>() {
+            @Override
+            public Long doInRedis(RedisConnection connection) throws DataAccessException {
+                return connection.del(redis_key);
+            }
+        });
+        return l > 0;
+    }
+}

+ 18 - 0
src/main/java/com/diagbot/vo/MrVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2019/8/28 18:45
+ */
+@Getter
+@Setter
+public class MrVO {
+    @NotBlank(message = "请输入病历编号")
+    private String mrId; //病历编号
+}

+ 180 - 0
src/main/java/com/diagbot/vo/PushJoinVO.java

@@ -0,0 +1,180 @@
+package com.diagbot.vo;
+
+import com.diagbot.biz.push.entity.Item;
+import com.diagbot.biz.push.entity.Lis;
+import com.diagbot.biz.push.entity.Pacs;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2019/8/28 17:44
+ */
+@Getter
+@Setter
+public class PushJoinVO {
+    /**
+     * 医院编码
+     */
+    private String hosCode;
+
+    /**
+     * 年龄
+     */
+    @NotNull(message = "请输入年龄")
+    private Integer age;
+    /**
+     * 性别
+     */
+    @NotNull(message = "请输入性别")
+    private Integer sex;
+
+    /**
+     * 婚姻
+     */
+    private String marriage;
+    /**
+     * 主诉
+     */
+    private String chief;
+    /**
+     * 现病史
+     */
+    private String symptom;
+    /**
+     * 查体
+     */
+    private String vital;
+    /**
+     * 既往史
+     */
+    private String pasts;
+    /**
+     * 传染病史
+     */
+    private String infectious;
+    /**
+     * 手术外伤史
+     */
+    private String operation;
+    /**
+     * 过敏史
+     */
+    private String allergy;
+    /**
+     * 接种史
+     */
+    private String vaccination;
+    /**
+     * 个人史
+     */
+    private String personal;
+    /**
+     * 婚育史
+     */
+    private String marital;
+    /**
+     * 家族史
+     */
+    private String family;
+    /**
+     * 月经史
+     */
+    private String menstrual;
+    /**
+     * 其他史
+     */
+    private String other;
+    /**
+     * 化验文本数据
+     */
+    private String lisString;
+    /**
+     * 辅检文本数据
+     */
+    private String pacsString;
+    /**
+     * 诊断文本数据
+     */
+    private String diagString;
+    /**
+     * 药品文本数据
+     */
+    private String drugString;
+    /**
+     * 不能分类文本
+     */
+    private String unknown;
+    /**
+     * 化验项目和结果
+     */
+    private List<Lis> lis;
+    /**
+     * 辅检项目和结果
+     */
+    private List<Pacs> pacs;
+    /**
+     * 诊断
+     */
+    private List<Item> diag;
+    /**
+     * 药品
+     */
+    private List<Item> drug;
+    /**
+     * 当前化验开单项
+     */
+    private List<Lis> lisOrder;
+    /**
+     * 当前辅检开单项
+     */
+    private List<Pacs> pacsOrder;
+    /**
+     * 当前诊断开单项
+     */
+    private List<Item> diagOrder;
+    /**
+     * 当前药品开单项
+     */
+    private List<Item> drugOrder;
+    /**
+     * 当前手术开单项
+     */
+    private List<Item> operationOrder;
+    /**
+     * 其他开单项
+     */
+    private List<Item> otherOrder;
+    /**
+     * 选中诊断
+     */
+    private Item diseaseName;
+    /**
+     * 诊断类型(0-普通病(默认不填),1-慢病,2-急诊)
+     */
+    @ApiModelProperty(hidden = true)
+    private Integer disType;
+    /**
+     * 量表名称
+     */
+    private String scaleName;
+
+    //创建时间
+    @ApiModelProperty(hidden = true)
+    private String mrId; //病历编号
+    //创建时间
+    @ApiModelProperty(hidden = true)
+    private Date createTime;
+    //过期时间
+    @ApiModelProperty(hidden = true)
+    private Date expireTime;
+    //过期时间字符串
+    @ApiModelProperty(hidden = true)
+    private String expireTimeStr;
+}

+ 1 - 1
src/main/java/com/diagbot/web/DisclaimerInfoController.java

@@ -27,7 +27,7 @@ import java.util.List;
  * @since 2020-07-27
  */
 @RestController
-@RequestMapping("/disclaimerInfo")
+@RequestMapping("/sys/disclaimerInfo")
 @Api(value = "免责申明详情API[by:wangfeng]", tags = { "免责申明详情API" })
 @SuppressWarnings("unchecked")
 public class DisclaimerInfoController {

+ 47 - 0
src/main/java/com/diagbot/web/MrController.java

@@ -0,0 +1,47 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.MrFacade;
+import com.diagbot.vo.MrVO;
+import com.diagbot.vo.PushJoinVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * @Description: 病历保存到redis控制层
+ * @author: gaodm
+ * @time: 2019/8/28 16:25
+ */
+@RestController
+@RequestMapping("/sys/mr")
+@Api(value = "电子病历API[by:wangfeng]", tags = { "电子病历API" })
+@SuppressWarnings("unchecked")
+public class MrController {
+
+	@Autowired
+	private MrFacade mrFacade;
+
+	@ApiOperation(value = "保存病历信息:[by:gaodm]",
+			notes = "")
+	@PostMapping("/createMr")
+	@SysLogger("createMr")
+	public RespDTO<String> createMr(@RequestBody PushJoinVO pushJoinVO) {
+		return RespDTO.onSuc(mrFacade.createMr(pushJoinVO));
+	}
+
+	@ApiOperation(value = "获取病历信息 :[by:gaodm]",
+			notes = "mrId: 病历编号,必填<br>")
+	@PostMapping("/getMr")
+	@SysLogger("getMr")
+	public RespDTO<PushJoinVO> getMr(@RequestBody @Valid MrVO mrVO) {
+		return RespDTO.onSuc(mrFacade.getMr(mrVO.getMrId()));
+	}
+}

+ 1 - 1
src/main/java/com/diagbot/web/VersionDetailController.java

@@ -14,7 +14,7 @@ import org.springframework.stereotype.Controller;
  * @since 2020-07-27
  */
 @Controller
-@RequestMapping("/versionDetail")
+@RequestMapping("/sys/versionDetail")
 public class VersionDetailController {
 
 }

+ 1 - 1
src/main/java/com/diagbot/web/VersionInfoController.java

@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2020-07-27
  */
 @RestController
-@RequestMapping("/versionInfo")
+@RequestMapping("/sys/versionInfo")
 @Api(value = "版本信息(关于)API[by:wangfeng]", tags = { "版本信息(关于)API" })
 @SuppressWarnings("unchecked")
 public class VersionInfoController {

+ 1 - 0
src/main/resources/application-dev.yml

@@ -110,6 +110,7 @@ spring:
     database:
       cache: 15 # cache索引
       token: 15 # Token索引
+      mr: 15 # 病历索引
     host: 192.168.2.236  #Redis服务器地址
     port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)

+ 1 - 0
src/main/resources/application-local.yml

@@ -110,6 +110,7 @@ spring:
     database:
       cache: 15 # cache索引
       token: 15 # Token索引
+      mr: 15 # 病历索引
     host: 192.168.2.236  #Redis服务器地址
     port: 6378 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)

+ 1 - 0
src/main/resources/application-pre.yml

@@ -110,6 +110,7 @@ spring:
     database:
       cache: 15 # cache索引
       token: 15 # Token索引
+      mr: 15 # 病历索引
     host: 192.168.2.121  #Redis服务器地址
     port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)

+ 1 - 0
src/main/resources/application-pro.yml

@@ -110,6 +110,7 @@ spring:
     database:
       cache: 15 # cache索引
       token: 15 # Token索引
+      mr: 15 # 病历索引
     host: 192.168.2.122  #Redis服务器地址
     port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)

+ 1 - 0
src/main/resources/application-test.yml

@@ -110,6 +110,7 @@ spring:
     database:
       cache: 15 # cache索引
       token: 15 # Token索引
+      mr: 15 # 病历索引
     host: 192.168.2.241  #Redis服务器地址
     port: 6379 # Redis服务器连接端口(本地环境端口6378,其他环境端口是6379)
     password: lantone # Redis服务器连接密码(默认为空)