Answer
If you do not provide a certificate of treatment, this will not necessarily lead to a refusal, but you may be referred to a general practitioner. In this case, the Carné de Salud is issued only after a consultation and clarification of the medical situation.
A certificate or discharge summary helps the doctor quickly understand a person's diagnosis, the treatment they have undergone, and the medication they take. Without this information, the medical center may err on the side of caution and schedule an additional visit to avoid overlooking important restrictions.
For a chronic illness, recent surgery, or ongoing treatment, it is sensible to bring brief medical records with you. They do not replace the examination itself, but reduce the chance that the process will be delayed because further information is needed.