Loading
Insurance
InsProviderNetworkService:getProvidersDetail

InsProviderNetworkService:getProvidersDetail

Ce service permet de récupérer des informations sur les prestataires, notamment les affiliations et les emplacements de groupe.

Classe :InsProviderNetworkService

Méthode :getProvidersDetail

Fonctionnement

  1. En utilisant l'ID, le service recherche l'enregistrement Fournisseur (Contact) en utilisant SOQL construit avec un certain nombre de requêtes internes, y compris les enregistrements associés.

  2. Si fieldSetName est défini dans l'entrée, ses champs sont utilisés pour les détails du fournisseur.

  3. Si aucun jeu de champs n'est fourni dans l'entrée, l'ensemble de champs par défaut suivant est inclus dans les détails du fournisseur (Contact) :

    • Id

    • FirstName

    • LastName

    • E-mail

    • Téléphone

    • Télécopie

    • ProviderIdentifier__c

    • Has24x7Service__c

    • MailingStreet

    • MailingCity

    • MailingState

    • MailingPostalCode

    • MailingCountry

  4. Le résultat inclut AccountContactRelations (emplacement du fournisseur et groupe de prestataires) avec les champs suivants :

    • AccountId

    • Account.Name

    • Account.RecordTypeId

    • Account.BillingStreet

    • Account.BillingCity

    • Account.BillingState

    • Account.BillingPostalCode

    • Account.BillingCountry

    • IsPrimaryRelationship__c

    • OperatingHoursId__c

  5. Les données générées sous la forme d'une instance d'objet Contact sont désérialisées et analysées en Map <String, Object> et renvoyées dans le cadre d'un JSON de sortie dans le nœud result.

Entrées utilisateur

Entrée

Description

id

ID d'enregistrement du fournisseur

fieldSetName

Nom du jeu de champs de l'objet Contact

JSON d'entrée

L'entrée JSON est formatée comme suit :

{
  "Id": <Contact Id>,
  "fieldSetName": <Contact object fieldset>
}

Exemple d'entrée JSON avec des données :

{
  "Id": "0035w0000396WMzAAM",
  "fieldSetName": "ProviderFieldSet"
}

JSON de sortie

La sortie JSON est formatée comme suit :

{
  "fieldSetName": <COntact fieldset used during service call>,
  "Id": <Provider/Contact record ID used during service call>,
  "result": {
    "RecordTypeId": <Contact Record Type>,
    "Id": <Contact record ID>,
    "Field 1": <Contact object field value>,
    "Field 2": <Contact object field value>,
    "AccountContactRelations": {
      "records": [
        {
          "Account": {
            "Id": <Account record ID>,
            "BillingCountry": <Account.BillingCountry value>,
            "BillingCity": <Account.BillingCity value>,
            "RecordTypeId": <Account Record Type>,
            "Name": <Account.Name value>
          },
          "IsPrimaryRelationship__c": <Primary relationship indicator>,
          "AccountId": <Account record ID>,
          "Id": <AccountContactRelation record ID>,
          "ContactId": <Contact record ID>
        }
      "done": true,
      "totalSize": <AccountContactRelations count>
    }
  },
  "error": "OK"
}

Exemple de sortie JSON avec des données.

{
  "fieldSetName": "ProviderFieldSet",
  "Id": "0035w0000396WMzAAM",
  "result": {
    "RecordTypeId": "0125w000001FVCuAAO",
    "Id": "0035w0000396WMzAAM",
    "Email": "lesliejohann@email.com",
    "Name": "Leslie Johann",
    "AccountContactRelations": {
      "records": [
        {
          "Account": {
            "Id": "0015w00002EiEyNAAV",
            "BillingCountry": "Germany",
            "BillingCity": "Berlin",
            "RecordTypeId": "0125w000001FVChAAO",
            "Name": "Berlin Facility (Location)"
          },
          "IsPrimaryRelationship__c": false,
          "AccountId": "0015w00002EiEyNAAV",
          "Id": "07k5w00000JPRM0AAP",
          "ContactId": "0035w0000396WMzAAM"
        },
        {
          "Account": {
            "Id": "0015w00002EiF2KAAV",
            "RecordTypeId": "0125w000001FVCgAAO",
            "Name": "First EU Medical Group"
          },
          "IsPrimaryRelationship__c": false,
          "AccountId": "0015w00002EiF2KAAV",
          "Id": "07k5w00000JPRMFAA5",
          "ContactId": "0035w0000396WMzAAM"
        }
      ],
      "done": true,
      "totalSize": 2
    }
  },
  "error": "OK"
}
 
Chargement
Salesforce Help | Article