PatientController.java 929 B

12345678910111213141516171819202122232425262728
  1. package com.yihu.jw.controller;
  2. import com.yihu.jw.fegin.PatientFegin;
  3. import io.swagger.annotations.Api;
  4. import io.swagger.annotations.ApiOperation;
  5. import io.swagger.annotations.ApiParam;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.http.ResponseEntity;
  8. import org.springframework.web.bind.annotation.*;
  9. import org.springframework.web.client.RestTemplate;
  10. /**
  11. * Created by chenweida on 2017/5/10.
  12. */
  13. @RestController
  14. @RequestMapping("/rest/patient")
  15. @Api(description = "患者")
  16. public class PatientController {
  17. @Autowired
  18. private PatientFegin patientFegin;
  19. @ApiOperation(value = "根据code查找患者")
  20. @GetMapping(value = "findByCode")
  21. public String findByCode(
  22. @ApiParam(name = "code", value = "患者code", required = true) @RequestParam(value = "code", required = true) String code) {
  23. return patientFegin.findByCode(code);
  24. }
  25. }