gematik / ref-eRp-FD-Server

ARCHIVED - This project acts as reference implementation of main aspects of an e-prescription server designed by gematik.
Other
44 stars 3 forks source link

eprescription identifier starts always at "0" #16

Closed nauni77 closed 3 years ago

nauni77 commented 3 years ago

Hello,

we are implementing a link to your eprescription service. During our tests we will process eprescriptions and store this information (technicalIDs and eprescriptionIDs) inside our system.

But if we restart your test service it starts generating the eprescription identifier again at "0" and count up. That means we have a lot of duplicates until we generate eprescriptions with new numbers.

First ID:

  "identifier" : [ {
    "system" : "https://gematik.de/fhir/NamingSystem/PrescriptionID",
    "value" : "160.000.000.000.000.57"
  }

The following IDs will be generated:

  1. 160.000.000.000.000.57
  2. 160.000.000.000.001.54
  3. 160.000.000.000.002.51
  4. 160.000.000.000.003.48
  5. and so on ...

If we build your test service again and restart our instance - it causes always a complete reset of our test data. This is really annoying.

Can you please change this and always generate a random identifier? Because of the large range of identifiers its quite unlikely that we generate (at our test system) a identifier twice. Of cause you can't avoid the generation of the same ids (from the previous run) after restarting your service, but its very unlikely.

But it's much better, because counting from "0" will always will result in duplicate eprescription ids.

Thanks in advance and best regards

Oli

Gematik-Entwicklung commented 3 years ago

Hi Oli,

the current implementation of the prescription id is just a first shoot. The specification requires that the prescription id has to be unique over all generated IDs. A random number does not fulfill these needs. We try to find a combined solution like it is done in UUIDv1 (random + counter + timestamp), this should solve your problem and also does fulfill the needs of the specification.

We planed to do this later, but I think we can address this in out next release (next week). So you are able to work with it.

Best regards, gematik Dev-Team.

nauni77 commented 3 years ago

Hi,

if you implement a algorithm that generates unique IDs - even after restart your test service - would be perfect. We would be very happy if you can address this in the next release.

Thanks in advance and best regards,

Oli

Gematik-Entwicklung commented 3 years ago

Hi Oli,

we have released a new version a couple of minutes ago, that implements the prescription ID as described above.

Best regards, gematik Dev-Team.

nauni77 commented 3 years ago

This new version works. Thanks!