In view of an improvement of the accuracy of the traditional named entity recognition model in Chinese electronic medical records, a method has thus been proposed with adversarial training added to the baseline model BERT-BILSTM-CRF. By adopting the proposed method, disturbance factors are added to the word embedding layer for the generation of adversarial samples, which will be used for an iterative training to optimize the model parameters. The experimental results of CCKS2021 evaluation data set show that the accuracy rate, recall rate and F1 value are improved compared with the baseline model with FGM and PGD confrontation training models added. Based on comparative experiments, it is verified that adding confrontation training can improve the prediction ability and robustness of the model.