Running Fidelius for encryption

We are with M3 module and trying to impl the API’s.
We were also given the tool FIDELIUS to check the encryption/decryption part.
 We are able to use the tool to get the encrypted package successfully.
 Also the decryption API call is successful.

We have 2 primary questions at this point.

  1. In the below encrypt call , the last input “plainTextData” should be fed with what ?
    JFYI, In our case we are creating few records at the EMR and have not implemented the HIP.
    We want to understand how the data created at the EMR can be passed here ?

  2. The FIDELIUS service seems to work fine on the local system . So, if we plan to use this in actual environment is it expected that we run this service locally always ?
    JFYI, we are using docker compose , calling the Fidelius service. Once the service is running on our local system, API calls for 1)keys generation 2)encryption and 3)decryption are responding well.

Could you please help us understand the above 2 clarification questions .

Thanks in advance

@Psingh07,

You need to pass valid fhir document under plainTextData:
Please find the dummy payload below,

“{
““receiverPublicKey””: ““AgX0+VBhmllh4SUkYylAUMhqW+AddF9pjTkcgRhyeGFu””,
““receiverNonce””: ““pfCoG2ohpogSWc4feUM7mH6Jcod/5fRWKve/BlI2NTQ=””,
““senderPrivateKey””: ““Dhqn4skrCX4CTCV1Sswu0eHglzkZ8vWHezLE6Q+pBcI=””,
““senderPublicKey””: ““BE+Eq5ibZjEQ6ZRJHAUtDlyEkgjQqIwZ8p/JOsIEAl7tYvM2l7fwNHQoTZsEBtTvfkzAf7yTx8rJV3M02e6Zc1c=””,
““senderNonce””: ““kZvZ7FsjqjzCozeDK1Qmjpww4KBo5FjF9hAH4GBpGdE=””,
““plainTextData””: “”{”“resourceType”":"“Bundle”","“id”":"“bundle01"”,"“meta”":{"“versionId”":"“1"”,"“lastUpdated”":"“2021-10-27T15:32:26.605+05:30"”},"“timestamp”":"“2021-01-27T15:32:26.605+05:30"”,"“identifier”":{"“system”":"“https://example.hospital.com/pr”","“value”":"“bundle01"”},"“type”":"“document”","“entry”":[{"“fullUrl”":"“Composition/1"”,"“resource”":{"“resourceType”":"“Composition”","“id”":"“1"”,"“date”":"“2021-01-01T15:32:26.605+05:30"”,"“meta”":{"“versionId”":"“1"”,"“lastUpdated”":"“2021-01-01T15:32:26.605+05:30"”},"“identifier”":{"“system”":"“https://example.hospital.com/documents”","“value”":"“645bb0c3-ff7e-4123-bef5-3852a4784813"”},"“status”":"“final”","“type”":{"“coding”":[{"“system”":"“https://ndhm.gov.in/sct”","“code”":"“440545006"”,"“display”":"“Prescription record”"}],"“text”":"“Prescription Record”"},"“subject”":{"“reference”":"“Patient/1"”,"“display”":"“Hina Patel”"},"“author”":[{"“reference”":"“Practitioner/1"”,"“display”":"“Dr. Manju Sengar”"}],"“title”":"“Prescription record”","“encounter”":{"“reference”":"“Encounter/7fce6ec8-5013-4a27-b0a6-c43232608cda”","“display”":"“OP Visit”"},"“attester”":[{"“mode”":"“official”","“time”":"“2019-01-04T09:10:14Z”","“party”":{"“reference”":"“Organization/MaxSaket01"”,"“display”":"“Max Super Speciality Hospital, Saket”"}}],"“section”":[{"“title”":"“Prescription record”","“code”":{"“coding”":[{"“system”":"“https://affinitydomain.in/sct”","“code”":"“440545006"”,"“display”":"“Prescription record”"}]},"“entry”":[{"“reference”":"“MedicationRequest/1"”}]}]}},{"“fullUrl”":"“Organization/MaxSaket01"”,"“resource”":{"“resourceType”":"“Organization”","“id”":"“MaxSaket01"”,"“name”":"“Max Super Speciality Hospital, Saket”","“identifier”":[{"“type”":{"“coding”":[{"“system”":"“http://terminology.hl7.org/CodeSystem/v2-0203"”,"“code”":"“PRN”","“display”":"“Provider number”"}]},"“system”":"“https://facility.ndhm.gov.in”","“value”":"“10000005"”}],"“address”":[{"“line”":["“1, 2, Press Enclave Marg, Saket Institutional Area, Saket”"],"“city”":"“New Delhi”","“state”":"“New Delhi”","“postalCode”":"“110017"”,"“country”":"“INDIA”"}]}},{"“fullUrl”":"“Encounter/7fce6ec8-5013-4a27-b0a6-c43232608cda”","“resource”":{"“resourceType”":"“Encounter”","“id”":"“7fce6ec8-5013-4a27-b0a6-c43232608cda”","“status”":"“finished”","“class”":{"“system”":"“http://terminology.hl7.org/CodeSystem/v3-ActCode”","“code”":"“AMB”","“display”":"“Outpatient visit”"}}},{"“fullUrl”":"“MedicationRequest/1"”,"“resource”":{"“id”":"“1"”,"“resourceType”":"“MedicationRequest”"}}]}""
}"

thanks