Lab cbc order using hapi fhir dstu-3


#1

I am using HAPI FHIR and want to send HIV ORDER to a lab to perform this test and send results back to me. which resource should i use

  1. ServiceRequest
  2. DiagnosticOrder
  3. CarePlan

#2

ServiceRequest is fine in R4.
DiagnosticOrder is in DSTU2

Which version of FHIR do you want to use?


#3

@RichardT thank you for your kind reply. I am using DSTU3. Should I use it or move to R4?


#4

That depends upon your time-frames.
Support for R4 will increase a lot over the next few months. Forge for R4 is not due until April or so.
Lots of people will have to work out how to move from 3 to 4.


#5

thank you @RichardT I have designed a DSTU3 Procedure Request AS below Kindly verify this Resource; is it correct way to populate RequestProcedure Resource? or something is missing. I will be highly thnakfull to you

ProcedureRequest proReq = new ProcedureRequest();
proReq.setId(“CBC”);
proReq.setStatus(ProcedureRequestStatus.ACTIVE);
proReq.setIntent(ProcedureRequestIntent.ORDER);

    CodeableConcept cbc = new CodeableConcept();
    cbc.addCoding().setDisplay("Complete Blood Count").setCode("26604007").setSystem("http://snomed.info/sct");
    proReq.setCode(cbc);

    Reference subject = new Reference();
    Patient pat = new Patient();
    pat.addIdentifier().setSystem(Constants.serverIp + "/Patient").setValue("00160000000003").setUse(IdentifierUse.OFFICIAL);
    pat.setGender(Enumerations.AdministrativeGender.MALE);
    try {
        pat.setBirthDate(new SimpleDateFormat("yyyy-MM-dd").parse("2018-03-03"));
    } catch (ParseException ex) {
        Logger.getLogger(ProcedureRequestHandler.class.getName()).log(Level.SEVERE, null, ex);
    }
    subject.setResource(pat);
    subject.setDisplay("Patient");
    proReq.setSubject(subject);

    ArrayList<Identifier> idLst = new ArrayList<Identifier>();
    Identifier i = new Identifier();
    i.setSystem("urn:ietf:rfc:3986").setUse(IdentifierUse.OFFICIAL).setValue("001RCH16000149");//sample id
    idLst.add(i);
    proReq.setIdentifier(idLst);
    proReq.addBasedOn().setDisplay("Order").setReference("http://192.192.8.102:7006/skmfhir/ProcedureRequest/001RCH16000149");

    proReq.setPriority(ProcedureRequestPriority.ROUTINE);
    proReq.addCategory().addCoding().setDisplay("Diagnostic Procedure").setCode("103693007").setSystem("http://hl7.org/fhir/ValueSet/procedure-category");

    Reference specimenRef = new Reference();
   /* Specimen specimen = new Specimen();
    specimen.addIdentifier().setSystem(Constants.serverIp + "/Specimen").setValue("00160000000003").setUse(IdentifierUse.OFFICIAL);
    specimen.setStatus(SpecimenStatus.AVAILABLE);
    specimenRef.setResource(specimen);
    specimenRef.setDisplay("Speciment Urine");*/
   
    // specimen.setType(new CodeableConcept().setText("").addCoding().setCode("").setSystem("").setDisplay(""));

     specimenRef.setDisplay("Speciment Urine with id 0016000");//.setReference("http://snomed.info/sct");
      proReq.addSpecimen(specimenRef);
  
    // set requester information
    ProcedureRequestRequesterComponent requester = new ProcedureRequestRequesterComponent();
     Reference agent = new Reference();
    
     agent.setDisplay("SKM");//.setReference("https://shaukatkhanum.org.pk/");
     Reference onBehalfOf = new Reference();
     onBehalfOf.setDisplay("SKM");//.setReference("https://shaukatkhanum.org.pk/");
     requester.setAgent(agent).setOnBehalfOf(onBehalfOf);
     proReq.setRequester(requester);

#6

Coding for FHIR is not one of my skills. :frowning: