The invention relates to a medical system, in particular for implanting a knee joint endoprosthesis, comprises at least one medical referencing unit whose position in space is detectable using a surgical navigation system. The referencing unit comprises at least one surgical marker element that is arranged or formed on a carrier element and is detectable using a detection device of the surgical navigation system. The at least one referencing unit comprises a base body that carries the carrier element. The base body comprises at least one patient-specific bone contact face faces away from the base body and deviates from being a sector of a surface of a sphere and from being a planar surface. The at least one bone contact face is formed in a manner corresponding to a bone surface of the patient.