Exemplo n.º 1
0
        public void Run()
        {
            // Get contracts for my organization
            var contracts = _flrRead.GetGPContractsOnOffice(_organizationNumber, null);

            WriteLine("Contracts found:");
            foreach (var contract in contracts)
            {
                WriteLine($"Id: {contract.Id}, Municipality:{contract.Municipality.CodeText}, Period: {contract.Valid.From:d} - {contract.Valid.To:d}");
            }

            // Get the patient list for each contract and store it
            foreach (var contract in contracts)
            {
                contract.PatientList = _flrRead.GetGPPatientList(contract.Id);
                _contractRepository.SaveContract(contract);
            }
        }
Exemplo n.º 2
0
 private void HandleContractCreated(GPContract contract, IDictionary <string, object> properties)
 {
     WriteLine("Received ContractCreated");
     _contractRepository.SaveContract(contract);
 }